-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
103 lines (78 loc) · 2.55 KB
/
justfile
File metadata and controls
103 lines (78 loc) · 2.55 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
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
default:
@just --list
help:
@just --list
install:
bun install
dev *args:
bun run dev {{args}}
build:
bun run build
build-all:
bun run build:all
test:
bun test
test-watch:
bun run test:watch
test-coverage:
bun run test:coverage
typecheck:
bun run typecheck
lint:
bun run lint
lint-fix:
bun run lint:fix
format:
bun run format
check:
just lint
just typecheck
just test
ci:
just install
just check
just build
clean:
rm -rf dist
bump-patch:
just bump-version patch
bump-minor:
just bump-version minor
bump-major:
just bump-version major
bump-version bump:
pnpm version {{bump}} --no-git-tag-version
just update-all-versions
just commit-version
update-all-versions:
@VERSION=$(jq -r '.version' package.json); \
sed -i '' 's/const VERSION = "[^"]*";/const VERSION = "'"$VERSION"'";/' src/cli/index.ts; \
sed -i '' 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-deps/SKILL.md; \
sed -i '' 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-audit/SKILL.md; \
sed -i '' 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-quality/SKILL.md; \
echo "Updated versions to $VERSION"
commit-version:
@VERSION=$(jq -r '.version' package.json); \
git add package.json src/cli/index.ts skills/*/SKILL.md; \
git commit -m "chore: bump version to v$VERSION"; \
git tag v$VERSION; \
echo "Created tag v$VERSION"; \
echo "Push with: git push origin main --tags"
set-version version:
jq --arg v "{{version}}" '.version = $v' package.json > package.json.tmp && mv package.json.tmp package.json
@VERSION="{{version}}"; \
sed -i 's/const VERSION = "[^"]*";/const VERSION = "'"$VERSION"'";/' src/cli/index.ts; \
sed -i 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-deps/SKILL.md; \
sed -i 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-audit/SKILL.md; \
sed -i 's/^version: .*/version: '"$VERSION"'/' skills/upkeep-quality/SKILL.md; \
echo "Set all versions to $VERSION"
version-sync:
just update-all-versions
show-versions:
echo "=== Current Versions ==="
echo "package.json: $(jq -r '.version' package.json)"
echo "src/cli/index.ts: $(grep 'const VERSION' src/cli/index.ts | sed 's/.*"\(.*\)".*/\1/')"
echo "upkeep-deps/SKILL.md: $(grep '^version:' skills/upkeep-deps/SKILL.md | sed 's/version: //')"
echo "upkeep-audit/SKILL.md: $(grep '^version:' skills/upkeep-audit/SKILL.md | sed 's/version: //')"
echo "upkeep-quality/SKILL.md: $(grep '^version:' skills/upkeep-quality/SKILL.md | sed 's/version: //')"