-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTaskfile_cli.yaml
More file actions
48 lines (40 loc) · 1.32 KB
/
Taskfile_cli.yaml
File metadata and controls
48 lines (40 loc) · 1.32 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: 3
# This Taskfile is meant to be included for CLI repos.
# In addition to the library tasks, it contains tasks for building binaries installing the CLI tool.
run: once
method: checksum
includes:
lib:
taskfile: Taskfile_library.yaml
vars:
IS_CLI: true
flatten: true
build:
taskfile: tasks_cli_build.yaml
aliases:
- bld
- b
tasks:
# The following tasks are non-namespaced aliases for the most important namespaced tasks.
# This helps with visibility on 'task -l'.
install:
desc: " Install the CLI tool."
run: once
cmds:
- 'CGO_ENABLED=0 go install -ldflags="-X {{.MODULE_NAME}}/internal/version.buildVersion={{.VERSION}} -X {{.MODULE_NAME}}/internal/version.gitTreeState={{.GIT_TREE_STATE}} -X {{.MODULE_NAME}}/internal/version.gitCommit={{.GIT_COMMIT}} -X {{.MODULE_NAME}}/internal/version.buildDate={{.BUILD_DATE}}" "{{.ROOT_DIR2}}"'
build:
desc: " Build the binaries. Includes code generation and validation."
summary: This is an alias for 'build:all'.
run: once
deps:
- task: build:all
vars:
IS_CLI: true
build-raw:
desc: " Like 'build', but skips code generation/validation tasks."
summary: This is an alias for 'build:build-multi-raw'.
run: once
deps:
- task: build:build-multi-raw
vars:
IS_CLI: true