Skip to content

Commit e848615

Browse files
committed
Work + comment release script
1 parent 953819a commit e848615

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

release.sh

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# Bump and publish all, create single commit
4+
# Running the release cycle twice to ensure a single clean commit with multiple tags will be pushed,
5+
# with manual bump/skip for each package separately. One-off package publish can still be done from package dir.
6+
7+
# Start with publish and create release commit for knip core package
58
pnpm run --dir packages/knip release --no-git.tag --no-git.push --no-github.release
6-
pnpm run --dir packages/language-server release --no-git.changelog --no-git.commitMessage --no-git.tag --no-git.push '--git.commitArgs=--amend --no-edit'
7-
pnpm run --dir packages/mcp-server release --no-git.changelog --no-git.commitMessage --no-git.tag --no-git.push '--git.commitArgs=--amend --no-edit'
8-
pnpm run --dir packages/vscode-knip release --no-git.changelog --no-git.commitMessage --no-git.tag --no-git.push '--git.commitArgs=--amend --no-edit'
9-
10-
# Tag all, push once, github release
11-
pnpm run --dir packages/language-server release --no-git.changelog --no-increment --no-npm.publish --no-git.commit --no-git.push
12-
pnpm run --dir packages/mcp-server release --no-git.changelog --no-increment --no-npm.publish --no-git.commit --no-git.push
13-
pnpm run --dir packages/vscode-knip release --no-git.changelog --no-increment --no-git.commit --no-git.push --no-hooks
9+
10+
# Bump and publish other packages
11+
BUMP_AND_PUBLISH="--no-git.changelog --no-git.commitMessage --no-git.tag --no-git.push '--git.commitArgs=--amend --no-edit'"
12+
pnpm run --dir packages/language-server release "$BUMP_AND_PUBLISH"
13+
pnpm run --dir packages/mcp-server release "$BUMP_AND_PUBLISH"
14+
pnpm run --dir packages/vscode-knip release "$BUMP_AND_PUBLISH"
15+
16+
# Tag other packages (this is why we run the show twice: git-amend + git-tag is moving target but we want to keep it clean)
17+
TAG="--no-git.changelog --no-increment --no-git.commit --no-git.push"
18+
pnpm run --dir packages/language-server release "$TAG" --no-npm.publish
19+
pnpm run --dir packages/mcp-server release "$TAG" --no-npm.publish
20+
pnpm run --dir packages/vscode-knip release "$TAG" --no-hooks
21+
22+
# End with core knip package to push & release,
1423
pnpm run --dir packages/knip release --no-increment --no-npm.publish --no-git.commit --no-hooks

0 commit comments

Comments
 (0)