Skip to content

Commit ecd6d53

Browse files
chore(publish): Use release script from publish-tools
1 parent 39f42bd commit ecd6d53

File tree

3 files changed

+20
-68
lines changed

3 files changed

+20
-68
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
"bundle_router": "rollup -c --environment ROUTER && rollup -c --environment ROUTER,MINIFY",
1515
"bundle_events": "rollup -c --environment EVENTS && rollup -c --environment EVENTS,MINIFY",
1616
"bundle_resolve": "rollup -c --environment RESOLVE && rollup -c --environment RESOLVE,MINIFY",
17-
"prepublishOnly": "npm run build",
18-
"changelog": "update_changelog --include-core",
19-
"release": "npm run noimplicitany && node ./scripts/release.js",
2017
"noimplicitany": "tsc --noEmit --noImplicitAny --moduleResolution node --target es6 test/noimplicitany.ts",
2118
"test": "npm run test:integrate",
2219
"test:ng12": "karma start --ngversion 1.2",
@@ -28,6 +25,8 @@
2825
"watch": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1",
2926
"debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome",
3027
"docs": "./scripts/docs.js",
28+
"release": "npm run noimplicitany && release --deps @uirouter/core && node ./scripts/bower_release.js",
29+
"prepublishOnly": "npm run build",
3130
"publishdocs": "node scripts/publishdocs.js",
3231
"artifacts": "artifact_tagging"
3332
},

scripts/bower_release.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!env node
2+
"use strict";
3+
4+
const version = require('../package.json').version;
5+
const util = require('@uirouter/publish-scripts/util');
6+
const _exec = util._exec;
7+
8+
util.ensureCleanMaster('master');
9+
10+
// branch, add/commit release files, and push to bower repository
11+
_exec(`git checkout -b bower-${version}`);
12+
_exec(`git add --force release`);
13+
_exec(`git commit -m "bower release ${version}"`);
14+
_exec(`git tag ${version}+bower`);
15+
_exec(`git remote add bower [email protected]:angular-ui/angular-ui-router-bower.git`);
16+
_exec(`git push bower ${version}+bower:${version}`);
17+
_exec(`git remote rm bower`);
18+
_exec(`git checkout master`);

scripts/release.js

-65
This file was deleted.

0 commit comments

Comments
 (0)