|
1 | 1 | #!/usr/bin/env bash |
2 | 2 | set -e |
3 | 3 |
|
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 |
5 | 8 | 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, |
14 | 23 | pnpm run --dir packages/knip release --no-increment --no-npm.publish --no-git.commit --no-hooks |
0 commit comments