-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #482 from webcat12345/add-publish-script
build(scripts): Add publish script
- Loading branch information
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 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
VERSION='invalid' | ||
|
||
Help() | ||
{ | ||
# Display Help | ||
echo "Add description of the script functions here." | ||
echo | ||
echo "Syntax: publish.sh [-v|h]" | ||
echo "options:" | ||
echo "v Version of package to release" | ||
echo "h Print this Help" | ||
echo | ||
} | ||
|
||
while getopts ":hv:" option; do | ||
case $option in | ||
v) # Enter a name | ||
VERSION=$OPTARG;; | ||
h) # display Help | ||
Help | ||
exit;; | ||
\?) # Invalid option | ||
echo "Error: Invalid option" | ||
exit;; | ||
esac | ||
done | ||
|
||
echo "Bumping version to ${VERSION}" | ||
|
||
npm version ${VERSION} --no-commit-hooks --no-git-tag-version --preid beta | ||
|
||
pushd src/lib/ui-switch | ||
|
||
npm version ${VERSION} --no-commit-hooks --no-git-tag-version --preid beta | ||
|
||
popd | ||
|
||
# git commit -am 'chore(version): Bump version' | ||
|
||
# git tag -a "${VERSION}" -m "Version ${VERSION}" |