Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
return to current branch (not always master)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwayson committed Feb 14, 2016
1 parent 6ad41db commit 1ef3b5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# config
BRANCH=$(git rev-parse --abbrev-ref HEAD)
VERSION=$(node --eval "console.log(require('./package.json').version);")
NAME=$(node --eval "console.log(require('./package.json').name);")

Expand Down Expand Up @@ -28,12 +29,12 @@ zip -r $NAME-v$VERSION.zip dist
# run gh-release to create the tag and push release to github
gh-release --assets $NAME-v$VERSION.zip

# checkout master and delete release branch locally and on GitHub
git checkout master
# checkout prev branch and delete release branch locally and on GitHub
git checkout $BRANCH
git branch -D gh-release
git push origin :gh-release

# re-run build in master branch before publishing
# re-run build in prevgit branch before publishing
npm run build

# publish release on NPM
Expand Down

0 comments on commit 1ef3b5f

Please sign in to comment.