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

Commit

Permalink
update release script to run all tests and build before release
Browse files Browse the repository at this point in the history
run gulp test instead of npm test (which only runs unit tests right now)
run build in master one more time before release to make sure dist folder is there
use zip instead of 7zip (for mac)

NOTE: this *must* be run on a mac

resolves #154
  • Loading branch information
tomwayson committed Dec 12, 2015
1 parent c5c6587 commit 0696dfa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VERSION=$(node --eval "console.log(require('./package.json').version);")
NAME=$(node --eval "console.log(require('./package.json').name);")

# build and test
npm test || exit 1
gulp test || exit 1

# checkout temp branch for release
git checkout -b gh-release
Expand All @@ -23,7 +23,7 @@ git commit -m "build $VERSION"
git push origin gh-release

# create a ZIP archive of the dist files
7z a $NAME-v$VERSION.zip dist
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
Expand All @@ -33,6 +33,9 @@ git checkout master
git branch -D gh-release
git push origin :gh-release

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

# publish release on NPM
# TODO: only publish if gh-release was successful, currently
# this fails often enough that we should do this manually
Expand Down

0 comments on commit 0696dfa

Please sign in to comment.