Improve Taskfile
Adds dependencies and sources to Taskfile. Signed-off-by: phoenix <felix@feldspaten.org>
This commit is contained in:
parent
c0c11bf7c7
commit
fd67a9b8bf
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -17,7 +17,10 @@
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
vendor/
|
||||||
|
|
||||||
|
# Task files
|
||||||
|
.task
|
||||||
|
|
||||||
# Go workspace file
|
# Go workspace file
|
||||||
go.work
|
go.work
|
||||||
|
|
24
Taskfile.yml
24
Taskfile.yml
|
@ -2,17 +2,31 @@
|
||||||
|
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
vars:
|
|
||||||
GREETING: Hello, World!
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
cmds:
|
cmds:
|
||||||
- go build -o weblug cmd/weblug/*.go
|
- go build -o weblug cmd/weblug/*.go
|
||||||
# silent: true
|
silent: false
|
||||||
|
aliases: [weblug]
|
||||||
|
generates:
|
||||||
|
- weblug
|
||||||
|
sources:
|
||||||
|
- cmd/weblug/*.go
|
||||||
static:
|
static:
|
||||||
cmds:
|
cmds:
|
||||||
- CGO_ENABLED=0 go build -ldflags="-w -s" -o weblug cmd/weblug/*.go
|
- go build -ldflags="-w -s" -o weblug cmd/weblug/*.go
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: '0'
|
||||||
|
silent: false
|
||||||
|
aliases: [weblug-static]
|
||||||
|
generates:
|
||||||
|
- weblug
|
||||||
|
sources:
|
||||||
|
- cmd/weblug/*.go
|
||||||
test:
|
test:
|
||||||
|
deps: [weblug]
|
||||||
|
# Ensure a weblug binary is present
|
||||||
|
preconditions:
|
||||||
|
- test -f weblug
|
||||||
cmds:
|
cmds:
|
||||||
- sudo bash -c "cd test && ./blackbox.sh"
|
- sudo bash -c "cd test && ./blackbox.sh"
|
||||||
|
|
Loading…
Reference in a new issue