File tree 2 files changed +38
-2
lines changed
2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 23
23
"start" : " cross-env TARGET=es rollup -c -w" ,
24
24
"build" : " rollup -c" ,
25
25
"test" : " cross-env NODE_ENV=test jest" ,
26
- "prepub" : " npm run test && npm run build" ,
27
- "pub" : " npm publish"
26
+ "release" : " bash scripts/release.sh"
28
27
},
29
28
"bugs" : {
30
29
"url" : " https://github.com/vuejs/vue-function-api/issues"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ if [[ -z $1 ]]; then
5
+ echo " Enter new version: "
6
+ read -r VERSION
7
+ else
8
+ VERSION=$1
9
+ fi
10
+
11
+ read -p " Releasing $VERSION - are you sure? (y/n) " -n 1 -r
12
+ echo
13
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
14
+ echo " Releasing $VERSION ..."
15
+
16
+ if [[ -z $SKIP_TESTS ]]; then
17
+ npm run test
18
+ fi
19
+
20
+ # build
21
+ VERSION=$VERSION npm run build
22
+
23
+ # commit
24
+ # git add -A
25
+ # git commit -m "build: build $VERSION"
26
+ # tag version
27
+ npm version " $VERSION " --message " build: release $VERSION "
28
+
29
+ # publish
30
+ git push origin refs/tags/v" $VERSION "
31
+ git push
32
+ if [[ -z $RELEASE_TAG ]]; then
33
+ npm publish
34
+ else
35
+ npm publish --tag " $RELEASE_TAG "
36
+ fi
37
+ fi
You can’t perform that action at this time.
0 commit comments