File tree Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash -e
2
+
3
+ update_version () {
4
+ echo " $( node -p " p=require('./${1} ');p.version='${2} ';JSON.stringify(p,null,2)" ) " > $1
5
+ echo " Updated ${1} version to ${2} "
6
+ }
7
+
8
+ current_version=$( node -p " require('./package').version" )
9
+
10
+ printf " Next version (current is $current_version )? "
11
+ read next_version
12
+
13
+ if ! [[ $next_version =~ ^[0-9]\. [0-9]+\. [0-9](-.+)? ]]; then
14
+ echo " Version must be a valid semver string i.e. 1.0.2, 2.3.0-beta.1"
15
+ exit 1
16
+ fi
17
+
18
+ next_ref=" v$next_version "
19
+
20
+ npm test -- --single-run
21
+
22
+ update_version ' package.json' $next_version
23
+ update_version ' bower.json' $next_version
24
+
25
+ node_modules/.bin/changelog -t $next_ref
26
+
2
27
npm run build-global
3
- node_modules/.bin/release
28
+ npm run build-npm
29
+
30
+ git commit -am " Version $next_version "
31
+
32
+ git tag $next_ref
33
+ git tag latest -f
34
+
35
+ git push origin master --tags
36
+
37
+ npm publish build/npm
You can’t perform that action at this time.
0 commit comments