-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: improve release script checks
- Loading branch information
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Use Node.js to read the version from package.json | ||
version=$(node -p "require('./package.json').version") | ||
|
||
# Check if the git tag exists on the remote (origin) without 'v' prefix | ||
if git ls-remote --tags origin "$version" | grep -q "refs/tags/$version"; then | ||
echo "Tag $version exists on origin (was released), proceeding with bump..." | ||
pnpm exec release-it | ||
echo 'Version successfully bumped, but release not yet cut!' | ||
else | ||
echo "Tag $version does not exist on origin." | ||
echo "This means $version hasn't been released yet." | ||
fi | ||
|
||
./scripts/postrelease.sh |
File renamed without changes.