-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
34 lines (29 loc) · 889 Bytes
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: "3"
silent: true
vars:
BINARY_NAME: zebra-serial-reader
ENTRY_FILE: ./cmd/.
BUILD_DIR: __dist
BUILD_FILE: "./{{.BUILD_DIR}}/{{.BINARY_NAME}}.exe"
RELEASE_FILE: "./{{.BUILD_DIR}}/{{.BINARY_NAME}}__upx.exe"
LDFLAGS: -ldflags="-s -w"
tasks:
run:
desc: Run without build.
cmd: go run {{.ENTRY_FILE}}
build:
desc: Build the binary file.
cmd: go build -v {{.LDFLAGS}} -o {{.BUILD_FILE}} {{.ENTRY_FILE}}
release:
desc: Build the a release binary file.
cmds:
- go build -v {{.LDFLAGS}} -o {{.RELEASE_FILE}} {{.ENTRY_FILE}}
- upx --best {{.RELEASE_FILE}}
#ignore_error: true
validate:
# https://github.com/Boeing/config-file-validator
desc: Validate config files.
cmds:
- echo '== Config file validator'
- echo
- validator --groupby pass-fail --exclude-dirs build,dist,node_modules,.svelte-kit