-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
70 lines (70 loc) · 2.2 KB
/
Copy pathTaskfile.yaml
File metadata and controls
70 lines (70 loc) · 2.2 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
version: '3'
vars:
GOLIC_VERSION: v0.2.0
COMMON_LIC: "2026 Shane"
TEMPLATE_LIC: "mit"
tasks:
default:
cmds:
- task: lint
lint-init:
desc: Install linting tools via Brew
cmds:
- brew install golangci-lint gitleaks yamllint
- go install golang.org/x/tools/cmd/goimports@latest
lint:
desc: Run all linters and formatters
deps: [license]
cmds:
- goimports -w ./
- yamllint .
- gitleaks detect . --no-git --verbose --config=.gitleaks.toml
license:
desc: License injection
cmds:
- task: golic-inject-run
vars: { ARGS: '-t {{.TEMPLATE_LIC}} -c "{{.COMMON_LIC}}"' }
license-dry:
desc: Dry run for license injection
cmds:
- task: golic-inject-run
vars: { ARGS: '-d -t {{.TEMPLATE_LIC}} -c "{{.COMMON_LIC}}"' }
license-remove:
desc: License remove
cmds:
- task: golic-remove-run
vars: { ARGS: '-t {{.TEMPLATE_LIC}} -c "{{.COMMON_LIC}}"' }
license-remove-dry:
desc: Dry run for license remove
cmds:
- task: golic-remove-run
vars: { ARGS: '-d -t {{.TEMPLATE_LIC}} -c "{{.COMMON_LIC}}"' }
update-helm-version:
desc: Updates the Helm chart version in Chart.yaml
vars:
NEW_VERSION: '{{ default "0.0.0" .NEW_VERSION }}'
preconditions:
- sh: command -v yq
msg: "yq is not installed. Install it via 'brew install yq' or the GitHub Action."
cmds:
- yq -i '.version = "{{.NEW_VERSION}}"' "{{.TASKFILE_DIR}}/technitium/Chart.yaml"
update-version:
desc: Updates the version in both workspace package.json files (strips leading 'v')
vars:
NEW_VERSION: '{{ default "0.0.0" .NEW_VERSION }}'
cmds:
- |
VERSION="{{.NEW_VERSION}}"
VERSION="${VERSION#v}"
npm pkg set version="$VERSION" --workspace=packages/node-hl7-client --workspace=packages/node-hl7-server
echo "Updated both workspaces to $VERSION"
golic-inject-run:
internal: true
cmds:
- go install github.com/Bugs5382/golic/cmd/golic@{{.GOLIC_VERSION}}
- "golic inject {{.ARGS}}"
golic-remove-run:
internal: true
cmds:
- go install github.com/Bugs5382/golic/cmd/golic@{{.GOLIC_VERSION}}
- "golic remove {{.ARGS}}"