-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
30 additions
and
6 deletions.
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
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,21 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# check if the working directory is clean | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Working directory not clean. Please commit all changes before publishing." | ||
exit 1 | ||
fi | ||
|
||
# read version from package.json | ||
VERSION=$(node -p -e "require('./package.json').version") | ||
|
||
# create a new git tag or error out if the tag already exists | ||
git tag -a v$VERSION -m "v$VERSION" | ||
|
||
echo "Publishing version: v$VERSION" | ||
|
||
read -p "Press enter to continue" | ||
|
||
git push origin v4 "v$VERSION" |
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