Skip to content

Commit e1dafdf

Browse files
feat(justfile): add preview-version recipe
Add preview-version recipe to justfile in Release group. This recipe allows previewing what version semantic-release would produce if the current branch were merged to a target branch. The recipe delegates to scripts/preview-version.sh with proper parameter handling for both root and package-level version previews.
1 parent fcc2a1e commit e1dafdf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

justfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,17 @@ test-release-all:
514514
cd "$pkg" && bun run test-release && cd ../..; \
515515
done
516516

517+
# Preview semantic-release version after merging current branch to target
518+
[group('release')]
519+
preview-version target="main" package="":
520+
#!/usr/bin/env bash
521+
set -euo pipefail
522+
if [ -n "{{package}}" ]; then
523+
./scripts/preview-version.sh "{{target}}" "{{package}}"
524+
else
525+
./scripts/preview-version.sh "{{target}}"
526+
fi
527+
517528
## Secrets
518529

519530
# Scan repository for secrets

0 commit comments

Comments
 (0)