File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 11
11
"build" : " node bin/vuepress build docs" ,
12
12
"lint" : " eslint --fix --ext .js,.vue bin/ lib/ test/" ,
13
13
"prepublishOnly" : " conventional-changelog -p angular -r 2 -i CHANGELOG.md -s" ,
14
+ "release" : " /bin/bash scripts/release.sh" ,
14
15
"test" : " node test/prepare.js && jest --config test/jest.config.js"
15
16
},
16
17
"repository" : {
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Select a version to release (input number):"
4
+ echo
5
+
6
+ select VERSION in patch minor major " Specific Version"
7
+ do
8
+ echo
9
+ if [[ $REPLY == 4 ]]; then
10
+ read -p " Enter a specific version: " -r VERSION
11
+ echo
12
+ if [[ -z $REPLY ]]; then
13
+ VERSION=$REPLY
14
+ fi
15
+ fi
16
+
17
+ read -p " Releasing @$VERSION version - are you sure? (y/n) " -n 1 -r
18
+ echo
19
+
20
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
21
+ # pre release task
22
+ npm run lint
23
+ npm run test
24
+
25
+ # bump version
26
+ npm version $VERSION
27
+ NEW_VERSION=$( node -p " require('./package.json').version" )
28
+ echo Releasing ${NEW_VERSION} ...
29
+
30
+ # github release
31
+ npm run prepublishOnly
32
+ git add CHANGELOG.md
33
+ git commit -m " chore: changelog"
34
+ git push
35
+ git push origin refs/tags/v${NEW_VERSION}
36
+ echo " ✅ released to Github"
37
+
38
+ # npm release
39
+ npm publish
40
+ echo " ✅ released to npm"
41
+ else
42
+ echo Cancelled
43
+ fi
44
+ break
45
+ done
46
+
You can’t perform that action at this time.
0 commit comments