Skip to content

Commit

Permalink
chore(release): Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerska committed Dec 2, 2015
1 parent dadd777 commit 64a7ff7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.3.2
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"main": "index.js",
"scripts": {
"lint": "eslint .",
"release": "./scripts/release.sh",
"test": "npm run lint"
},
"author": "Algolia <support@algolia.com>",
Expand Down
15 changes: 15 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /bin/sh

if test -n "$(git status --porcelain)"; then
echo "Your git directory is unclean"
exit
fi

current=`cat VERSION`
read -p "New version number (current is ${current}): " version
npm version $version
rm -f VERSION && echo $version > VERSION
git commit VERSION --amend -m "v$version"
git push
git push --tags
npm publish

0 comments on commit 64a7ff7

Please sign in to comment.