Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist/
/lib/bower_components
build/
bower_components
node_modules
.sass-cache
.DS_Store
Expand Down
38 changes: 38 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
command -v github-release >/dev/null 2>&1 || { echo >&2 "This requires github-release from https://github.com/aktau/github-release - please install and try again"; exit 1; }

echo "What sort of release? (major|minor|patch)"
while true; do
read TYPE
case $TYPE in
"major" ) break;;
"minor" ) break;;
"patch" ) break;;
* ) echo "Please answer major, minor or patch";;
esac
done

read -p "Release Title:" TITLE
read -p "Release Description:" DESCRIPTION
echo "\n Release $TITLE ($TYPE): $DESCRIPTION"

npm version $(TYPE)
VERSION=$(node -e 'console.log(require("./package.json").version)')
REPO=$(node -e 'console.log(require("./package.json").name)')
zip -r build-$VERSION.zip build

github-release release \
--user "ginetta" \
--repo $REPO \
--tag v$VERSION \
--name "$TITLE" \
--description "$DESCRIPTION"

github-release upload \
--user "ginetta" \
--repo $REPO \
--tag v$VERSION \
--name build-$VERSION.zip \
--file build-$VERSION.zip