Skip to content

Commit

Permalink
feat: added taskfile for development (thanks to @eschreve!) (#60)
Browse files Browse the repository at this point in the history
* feat: added taskfile for development (thanks to @eschreve!)

* fix: removed .task folder

Co-authored-by: brittonhayes <[email protected]>
  • Loading branch information
brittonhayes and brittonhayes authored Mar 2, 2022
1 parent 4403090 commit 2f3b8db
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*.dll
*.so
*.dylib

.task
# Test binary, built with `go test -c`
*.test

Expand Down
3 changes: 0 additions & 3 deletions Makefile

This file was deleted.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ it is also available for all packages in the repository in markdown format. Just
you'll see the GoDocs rendered in beautiful Github-flavored markdown thanks to the
awesome [gomarkdoc](https://github.com/princjef/gomarkdoc) tool.

## Development

To get involved developing features and fixes for Pillager, get started with the following:

- [Install Go](https://go.dev/doc/install)
- Install [Taskfile.dev](https://taskfile.dev/#/installation)
- Read the [CONTRIBUTING.MD](./CONTRIBUTING.md)

---

### Shoulders of Giants :star:
Expand Down
85 changes: 85 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
version: "3"

tasks:
default:
cmds:
- task -l

mod:
desc: download and tidy go modules
cmds:
- go mod download
- go mod tidy

clean:
desc: remove executables, temporary, and cached files
ignore_error: true
cmds:
- rm bin/pillager
- go clean -cache
- rm -rf pkg/hunter/testdata
- mkdir pkg/hunter/testdata

lint:
desc: runs golint
cmds:
- golangci-lint run ./...

test:
desc: run all tests
cmds:
- go test ./...

test:v:
desc: run all tests verbose
cmds:
- go test -v ./...

test:cov:
desc: run all tests and generate coverage
cmds:
- go test -covermode=set -coverprofile=coverage.out ./...
sources:
- ./**/*.go
generates:
- coverage.out
method: checksum

build:
desc: run go build
cmds:
- go build -v -o bin/pillager .
sources:
- ./**/*.go
generates:
- bin/pillager
method: checksum

install:
desc: install executable
cmds:
- go install github.com/brittonhayes/pillager@latest

run:
desc: run the executable
cmds:
- task: build
- bin/pillager

docs:gen:
desc: generate documentation via gomarkdocwn
cmds:
- go generate ./...

docs:serve:
desc: serve godoc server locally
silent: true
cmds:
- echo "Documentation is available at http://localhost:6060/pkg/github.com/brittonhayes/pillager/"
- godoc -http=:6060

dev-setup:
desc: set things up for local development
cmds:
- task: mod
- task: build

0 comments on commit 2f3b8db

Please sign in to comment.