forked from nightscout/cgm-remote-monitor
-
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
1 changed file
with
33 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,33 @@ | ||
#!/bin/bash | ||
set -ueE | ||
|
||
function update ( ) { | ||
upgrade=$1 | ||
npm version $upgrade || exit 255 | ||
} | ||
|
||
RELEASE_NOTES="Release.md" | ||
TYPE=${1-'patch'} | ||
echo "First update" | ||
|
||
npm ls . || echo -n "" | ||
NEW_TAG=$(update ${TYPE}) | ||
echo "Updating to $NEW_TAG" | ||
# npm commits a new package json on your behalf with a new tag pointed at it | ||
git reset --hard HEAD~1 | ||
git tag -d $NEW_TAG || echo "warning ${NEW_TAG} not present" | ||
BRANCH_NAME="release/${NEW_TAG}" | ||
git checkout -b ${BRANCH_NAME} | ||
npm ls . || echo -n "" | ||
cat /dev/null > ${RELEASE_NOTES} | ||
git changelog -t ${NEW_TAG} ${RELEASE_NOTES} | ||
echo "saving release notes" | ||
git add ${RELEASE_NOTES} | ||
git commit -vm "Release notes for ${NEW_TAG}" | ||
|
||
echo "Final update" | ||
update ${TYPE} | ||
echo "New version $NEW_TAG" | ||
echo "Branch ${BRANCH_NAME}" | ||
npm ls . || echo -n "" | ||
|