-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmise.toml
More file actions
61 lines (50 loc) 路 1.07 KB
/
Copy pathmise.toml
File metadata and controls
61 lines (50 loc) 路 1.07 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
[tools]
go = '1.26.3'
golangci-lint = "latest"
goreleaser = "latest"
lefthook = "latest"
[tasks.init]
run = 'lefthook install'
[tasks.release]
description = "Release a new version. Usage: mise run release -- v1.0.0"
run = '''
#!/usr/bin/env bash
set -eou pipefail
VERSION=${1:-}
if [ -z "$VERSION" ]; then
echo "Usage: mise run release -- <version>"
echo "Example: mise run release -- v1.0.0"
exit 1
fi
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: version must follow vX.Y.Z format (e.g. v1.2.3)"
exit 1
fi
if [ -n "$(git status --porcelain)" ]; then
echo "Error: working directory is dirty. Commit or stash changes before releasing."
git status --short
exit 1
fi
export GITHUB_TOKEN=$(gh auth token)
git tag "$VERSION"
git push origin "$VERSION"
goreleaser release --clean
'''
[tasks.lint]
run = """
#!/usr/bin/env bash
set -eou pipefail
go mod tidy
golangci-lint run ./...
go test ./...
"""
[tasks.fix]
run = """
#!/usr/bin/env bash
set -eou pipefail
go mod tidy
golangci-lint run --fix ./...
go test ./...
"""
[tasks.test]
run = 'go test ./...'