Skip to content

Commit

Permalink
added release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mserranom committed Jul 10, 2018
1 parent d0d170a commit 99912a0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -e

if [[ $# -eq 0 ]] ; then
echo 'version not provided: "./release.sh <VERSION>"'
exit 1
fi

NEW_VERSION=$1
BRANCH_NAME=prepare-version-${NEW_VERSION}

# prepare master branch
git fetch
git checkout master
if [ ! -z "$(git status --untracked-files=no --porcelain)" ]; then
echo "there are uncommitted changes in tracked files"
exit 1
fi

# update version
npm version --no-git-tag-version ${NEW_VERSION}
git commit package.json package-lock.json -m "updated version to ${NEW_VERSION}"
git push origin master

# create release
hub release create ${NEW_VERSION} -m "${NEW_VERSION}"

0 comments on commit 99912a0

Please sign in to comment.