Improve scripts to release npm and bower simultaneously
This commit is contained in:
parent
3a78226a6c
commit
c5a5a57c04
3 changed files with 19 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "diff2html",
|
"name": "diff2html",
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.0-rc.2",
|
||||||
"homepage": "http://rtfpessoa.github.io/diff2html/",
|
"homepage": "http://rtfpessoa.github.io/diff2html/",
|
||||||
"description": "Fast Diff to colorized HTML",
|
"description": "Fast Diff to colorized HTML",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "./scripts/release.sh",
|
"release": "./scripts/release.sh",
|
||||||
|
"release-bower": "./scripts/update-bower-version.sh",
|
||||||
"templates": "./scripts/hulk.js --wrapper node --variable 'browserTemplates' ./src/templates/*.mustache > ./src/templates/diff2html-templates.js",
|
"templates": "./scripts/hulk.js --wrapper node --variable 'browserTemplates' ./src/templates/*.mustache > ./src/templates/diff2html-templates.js",
|
||||||
"style": "jscs src/*.js src/ui/js/*.js",
|
"style": "jscs src/*.js src/ui/js/*.js",
|
||||||
"coverage": "istanbul cover _mocha -- -u exports -R spec ./test/**/*",
|
"coverage": "istanbul cover _mocha -- -u exports -R spec ./test/**/*",
|
||||||
|
|
@ -44,7 +45,7 @@
|
||||||
"test": "npm run style && npm run coverage && npm run check-coverage",
|
"test": "npm run style && npm run coverage && npm run check-coverage",
|
||||||
"codacy": "npm run coverage && cat ./coverage/lcov.info | codacy-coverage",
|
"codacy": "npm run coverage && cat ./coverage/lcov.info | codacy-coverage",
|
||||||
"preversion": "npm run release && npm test",
|
"preversion": "npm run release && npm test",
|
||||||
"version": "git add -A src dist",
|
"version": "npm run release-bower && git add -A src dist package.json bower.json",
|
||||||
"postversion": "git push && git push --tags"
|
"postversion": "git push && git push --tags"
|
||||||
},
|
},
|
||||||
"main": "./src/diff2html.js",
|
"main": "./src/diff2html.js",
|
||||||
|
|
|
||||||
16
scripts/update-bower-version.sh
Executable file
16
scripts/update-bower-version.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# diff2html update bower version
|
||||||
|
# by rtfpessoa
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "diff2html updating bower version..."
|
||||||
|
|
||||||
|
RELEASE_VERSION=$(cat package.json | grep "version" | head -1 | gsed -e 's/ "version": "\(.*\)",/\1/')
|
||||||
|
|
||||||
|
gsed -i 's/.*"version".*/ "version": "'${RELEASE_VERSION}'",/' bower.json
|
||||||
|
|
||||||
|
echo "diff2html updated bower version successfully!"
|
||||||
Loading…
Reference in a new issue