Skip to content

Commit

Permalink
Merge branch 'release-command' of https://github.com/jrbotros/store.js
Browse files Browse the repository at this point in the history
…into gh-218-release-script
  • Loading branch information
marcuswestin committed Jun 20, 2017
2 parents 1202809 + 521ed90 commit 261b74a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message = 'v%s'
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"description": "A localStorage wrapper for all browsers without using cookies or flash. Uses localStorage, globalStorage, and userData behavior under the hood",
"main": "dist/store.legacy.js",
"scripts": {
"test": "make test"
"test": "make test",
"preversion": "bash scripts/release-prompt.sh",
"version": "make build && git add -A dist",
"postversion": "git push && git push --tags"
},
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions scripts/release-prompt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/bash

read -p "Are you sure you want to upgrade to v$npm_package_version? Type '$npm_package_version' to continue: "
[[ $REPLY == $npm_package_version ]]

0 comments on commit 261b74a

Please sign in to comment.