File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -39,5 +39,16 @@ publish:
39
39
npm publish
40
40
41
41
define release
42
- npm version $(1 )
42
+ VERSION=`node -pe "require('./package.json').version"` && \
43
+ NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1 ) ')"` && \
44
+ node -e "\
45
+ ['./package.json'].forEach(function(fileName) {\
46
+ var j = require(fileName);\
47
+ j.version = \"$$NEXT_VERSION\";\
48
+ var s = JSON.stringify(j, null, 2);\
49
+ require('fs').writeFileSync(fileName, s);\
50
+ });" && \
51
+ git add package.json CHANGELOG.md && \
52
+ git commit -m "release v$$NEXT_VERSION" && \
53
+ git tag "v$$NEXT_VERSION" -m "release v$$NEXT_VERSION"
43
54
endef
Original file line number Diff line number Diff line change 18
18
"eslint-plugin-react" : " ^3.5.1" ,
19
19
"jsxhint" : " ^0.15.1" ,
20
20
"mocha" : " ^2.3.3" ,
21
+ "semver" : " ^5.1.0" ,
21
22
"zuul" : " ^3.6.0"
22
23
},
23
24
"peerDependencies" : {
You can’t perform that action at this time.
0 commit comments