Skip to content

Commit 6146342

Browse files
committed
include release script
1 parent 41e7b37 commit 6146342

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

build/release.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
echo "Enter release version: "
2+
read VERSION
3+
4+
read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
5+
echo # (optional) move to a new line
6+
if [[ $REPLY =~ ^[Yy]$ ]]
7+
then
8+
echo "Releasing $VERSION ..."
9+
git add -A
10+
git commit -m "[build] $VERSION"
11+
npm version $VERSION --message "[release] $VERSION"
12+
git push origin refs/tags/v$VERSION
13+
git push
14+
npm publish
15+
fi

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-router",
3-
"version": "0.1.0",
3+
"version": "0.0.0",
44
"description": "A router for Vue.js",
55
"main": "src/index.js",
66
"scripts": {
@@ -11,7 +11,8 @@
1111
"serve": "webpack-dev-server --quiet --hot --config example/webpack.config.js --content-base example --history-api-fallback",
1212
"watch-test": "webpack --watch test/unit/specs/index.js test/unit/test.build.js",
1313
"e2e-local": "nightwatch -c build/nightwatch.local.json -e chrome,firefox",
14-
"e2e-sauce": "nightwatch -c build/nightwatch.sauce.json -e chrome,firefox,ie10,ie11"
14+
"e2e-sauce": "nightwatch -c build/nightwatch.sauce.json -e chrome,firefox,ie10,ie11",
15+
"release": "bash ./build/release.sh"
1516
},
1617
"repository": {
1718
"type": "git",

0 commit comments

Comments
 (0)