-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added taskfile for development (thanks to @eschreve!) (#60)
* feat: added taskfile for development (thanks to @eschreve!) * fix: removed .task folder Co-authored-by: brittonhayes <[email protected]>
- Loading branch information
1 parent
4403090
commit 2f3b8db
Showing
4 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
*.dll | ||
*.so | ||
*.dylib | ||
|
||
.task | ||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |