-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
107 lines (91 loc) · 2.46 KB
/
Taskfile.yml
File metadata and controls
107 lines (91 loc) · 2.46 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
env:
CGO_ENABLED: 0
vars:
EXE: ir
tasks:
tidy:
cmd: go mod tidy
go:
cmds:
- go get -u
- task: tidy
actions:
desc: Actions Up
cmd: actions-up --exclude "cssnr/.*,actions/.*,docker/.*" --yes
lint:
desc: Lint
cmds:
- prettier --check .
- yamllint -c .github/yamllint.yaml .
- golangci-lint run
- actionlint -shellcheck="-e SC2129"
- hadolint Dockerfile
- shellcheck scripts/install.sh
- task: pslint
pslint:
desc: Invoke-ScriptAnalyzer does NOT exit with error!
platforms: [windows]
cmd: powershell -Command "Invoke-ScriptAnalyzer -Path scripts -Recurse"
clean:
desc: Clean All
cmds:
- rm -rf dist/client
- rm -rf out
build:
desc: GoReleaser Build
cmd: goreleaser build --snapshot --clean
release:
desc: GoReleaser Release
cmd: goreleaser release --snapshot --clean
docs:
desc: Zensical Docs
cmds:
- rm -rf .cache
- zensical serve --open
inno:
aliases: [setup]
desc: Inno Setup
deps: [pathmgr]
cmd: iscc.exe installer.iss
pathmgr:
desc: Download PathMgr
status: [test -d dist/PathMgr]
cmds:
- mkdir -p dist
- wget https://github.com/Bill-Stewart/PathMgr/releases/download/v2.0.0/PathMgr-2.0.0.zip -O dist/pathmgr.zip
- unzip dist/pathmgr.zip -d dist/PathMgr
- rm dist/pathmgr.zip
install:
vars:
TARGET_NAME: '{{.EXE}}{{if eq OS "windows"}}.exe{{end}}'
TARGET_DIR: '${HOME}{{if eq OS "windows"}}\bin\{{else}}/bin/{{end}}{{.TARGET_NAME}}'
cmds:
- go build -o "{{.TARGET_NAME}}"
- echo "Name {{.TARGET_NAME}}"
- mv "{{.TARGET_NAME}}" "{{.TARGET_DIR}}"
- echo Path "{{.TARGET_DIR}}"
- which "{{.TARGET_NAME}}"
- "{{.TARGET_NAME}} -V"
vhs:*:
desc: Create VHS Tape
vars:
TAPE_FILE: '{{index .MATCH 0 | default "demo"}}'
cmds:
- echo "Creating Tape assets/{{.TAPE_FILE}}.tape"
- vhs "assets/{{.TAPE_FILE}}.tape"
build:*:*:
desc: Build OS:ARCH
vars:
OS: "{{index .MATCH 0}}"
ARCH: "{{index .MATCH 1}}"
requires:
vars:
- name: OS
enum: [darwin, linux, windows]
- name: ARCH
enum: [amd64, arm64, "386"]
cmds:
- echo "Building {{.OS}} / {{.ARCH}}"
- GOOS={{.OS}} GOARCH={{.ARCH}} goreleaser build --snapshot --clean --single-target {{.CLI_ARGS}}