This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove archived versions, add release script
- Loading branch information
Showing
12 changed files
with
54 additions
and
31 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
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
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
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
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,37 @@ | ||
#!/bin/bash | ||
|
||
# config | ||
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 | ||
|
||
# checkout temp branch for release | ||
git checkout -b gh-release | ||
|
||
# run prepublish to build files | ||
grunt uglify | ||
|
||
# force add files | ||
git add terraformer.min.js -f | ||
|
||
# commit changes with a versioned commit message | ||
git commit -m "build $VERSION" | ||
|
||
# push commit so it exists on GitHub when we run gh-release | ||
git push upstream gh-release | ||
|
||
# create a copy of the minified library | ||
cp terraformer.min.js $NAME-$VERSION.js | ||
|
||
# run gh-release to create the tag and push release to github | ||
gh-release --assets $NAME-$VERSION.js | ||
|
||
# checkout master and delete release branch locally and on GitHub | ||
git checkout master | ||
git branch -D gh-release | ||
git push upstream :gh-release | ||
|
||
# publish release on NPM | ||
npm publish |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.