-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
56 lines (49 loc) · 1.27 KB
/
Copy pathmise.toml
File metadata and controls
56 lines (49 loc) · 1.27 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
[tools]
bats = "latest"
go = "1.26.2"
goreleaser = "latest"
yq = "latest"
[tasks.test]
run = "go test ./... -cover"
[tasks.build]
run = "go build -o dist/ ."
[tasks."install:local"]
depends = ["build"]
description = "install helmbake as a helm plugin from the local build"
run = '''
set -e
helm_plugins="$(helm env HELM_PLUGINS)"
if [ -z "$helm_plugins" ]; then
echo "could not determine HELM_PLUGINS dir" >&2
exit 1
fi
plugin_dir="$helm_plugins/helmbake"
mkdir -p "$plugin_dir/bin"
cp -f plugin.yaml "$plugin_dir/plugin.yaml"
cp -f dist/helmbake "$plugin_dir/bin/helmbake"
chmod +x "$plugin_dir/bin/helmbake"
echo "installed to $plugin_dir"
echo "try: helm bake --help"
'''
[tasks.integration]
run = "bats tests/"
[tasks."release:local"]
run = "goreleaser release --snapshot --clean --skip=publish"
[tasks."release:check"]
run = "goreleaser check"
[tasks.release]
depends = ["release:check"]
description = "tag and push using plugin.yaml's version (from HEAD)"
run = '''
set -e
version=$(git show HEAD:plugin.yaml | yq .version)
if [ -z "$version" ]; then
echo "could not read version from plugin.yaml at HEAD" >&2
exit 1
fi
tag="v$version"
echo "tagging and pushing $tag"
git fetch --tags
git tag "$tag"
git push origin HEAD "$tag"
'''