-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mise.toml
More file actions
116 lines (93 loc) · 2.6 KB
/
.mise.toml
File metadata and controls
116 lines (93 loc) · 2.6 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
108
109
110
111
112
113
114
115
116
[tools]
go = "1.25"
"golangci-lint" = "latest"
semver = "latest"
shellcheck = "latest"
[tasks.build]
description = "Build the jjtask binary"
run = "go build -o bin/jjtask-go ./cmd/jjtask"
[tasks.test]
description = "Run Go integration tests"
depends = ["build"]
run = "go test ./cmd/jjtask/cmd/..."
[tasks."lint:shell"]
description = "Run shellcheck on shell scripts"
run = "shellcheck bin/jj claude-plugin/bin/jj-guard"
[tasks."lint:go"]
description = "Run golangci-lint"
run = "golangci-lint run"
[tasks.lint]
description = "Run all linters"
depends = ["lint:shell", "lint:go"]
[tasks.fmt]
description = "Format Go code"
run = "go fmt ./..."
[tasks.tidy]
description = "Tidy Go modules"
run = "go mod tidy"
[tasks.ci]
description = "Run all CI checks (lint, test)"
depends = ["lint", "test"]
[tasks.clean]
description = "Clean build artifacts"
run = "rm -f bin/jjtask-go && go clean"
[tasks.install]
description = "Install jjtask to ~/.local/bin"
depends = ["build"]
run = "./install.sh"
[tasks.dev]
description = "Dev setup: symlinks + completions"
depends = ["build"]
run = "./dev.sh"
[tasks.release]
description = "Create and push a release tag (patch/minor/major or vX.Y.Z)"
depends = ["ci"]
run = """
#!/usr/bin/env bash
set -euo pipefail
arg="${1:-}"
if [[ -z "$arg" ]]; then
echo "Usage: mise run release <patch|minor|major|vX.Y.Z>"
current=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo ""
echo "Current: $current"
echo " patch → v$(semver bump patch "$current")"
echo " minor → v$(semver bump minor "$current")"
echo " major → v$(semver bump major "$current")"
exit 1
fi
# Get current version from latest tag
current=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
# Compute new version
case "$arg" in
patch|minor|major)
version="v$(semver bump "$arg" "$current")"
;;
v*)
version="$arg"
;;
*)
echo "Error: argument must be patch, minor, major, or vX.Y.Z"
exit 1
;;
esac
if [[ "$(semver validate "${version#v}")" != "valid" ]]; then
echo "Error: invalid version $version"
exit 1
fi
echo "Releasing: $current → $version"
# Strip v prefix for semver in plugin.json
ver="${version#v}"
echo "Updating plugin.json version to $ver..."
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$ver\"/" claude-plugin/.claude-plugin/plugin.json
rm -f claude-plugin/.claude-plugin/plugin.json.bak
# Commit version bump if changed
if ! jj diff --quiet; then
jj commit -m "Release $version"
fi
echo "Pushing..."
jj git push
git tag -f "$version"
git push origin "$version" --force
echo "Done. Check: https://github.com/coobaha/jjtask/actions"
"""