-
-
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
1 parent
88918e3
commit 1fff5c5
Showing
1 changed file
with
44 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
if [[ $(git status -s) ]]; then | ||
echo "Working directory is not clean!" | ||
git status -s | ||
echo | ||
fi | ||
|
||
ps | grep "webpack" | grep -v grep | awk '{print $1}' | xargs kill | ||
|
||
echo "Choose type of release:" | ||
echo | ||
echo " 1) Patch (default)" | ||
echo " 2) Minor" | ||
echo " 3) Major" | ||
echo | ||
read -n 1 -p "Please select a number or press Enter for a patch: " option | ||
echo | ||
|
||
case $option in | ||
1) version=patch ;; | ||
2) version=minor ;; | ||
3) version=major ;; | ||
*) version=patch ;; | ||
esac | ||
|
||
while true; do | ||
read -p "Create $version version? (y/n) " continue | ||
case $continue in | ||
[Yy]*) | ||
break | ||
;; | ||
[Nn]*) | ||
exit 0 | ||
;; | ||
*) | ||
echo "Please only enter \"y\" or \"n\"." | ||
;; | ||
esac | ||
done | ||
echo | ||
|
||
npm version $version | ||
git push origin && git push origin --tags |