Skip to content

Commit 74272d3

Browse files
committed
chore(*): artifact tagging scripts
1 parent 28af221 commit 74272d3

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"docs": "typedoc --tsconfig tsconfig.typedoc.json --readme README.md --name 'ui-router-ng2' --theme node_modules/ui-router-typedoc-themes/bin/default --out _doc --internal-aliases internal,coreapi,ng2api --external-aliases internalapi,external --navigation-label-globals ui-router-ng2",
1212
"prepublish": "npm run build",
1313
"changelog": "node scripts/update_changelog.js",
14-
"release": "node scripts/release.js"
14+
"release": "node scripts/release.js",
15+
"artifacts": "node scripts/artifact_tagging.js"
1516
},
1617
"homepage": "https://ui-router.github.io/ng2",
1718
"contributors": [

scripts/artifact_tagging.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!env node
2+
"use strict";
3+
4+
let version = require('../package.json').version;
5+
6+
require('shelljs/global');
7+
let readlineSync = require('readline-sync');
8+
let fs = require('fs');
9+
let path = require('path');
10+
let util = require('./util');
11+
let _exec = util._exec;
12+
13+
cd(path.join(__dirname, '..'));
14+
15+
if (!readlineSync.keyInYN('Ready to publish to ' + version + '-artifacts branch?')) {
16+
process.exit(1);
17+
}
18+
19+
util.ensureCleanMaster('master');
20+
21+
_exec('npm run package');
22+
23+
// then tag and push tag
24+
_exec(`git checkout -b ${version}-artifacts-prep`);
25+
_exec(`git add —force lib lib-esm bundles`);
26+
_exec(`git commit -m 'chore(*): commiting build files'`);
27+
_exec(`git tag ${version}-artifacts`);
28+
_exec(`git push -u origin ${version}-artifacts`);
29+
_exec(`git branch -D ${version}-artifacts-prep`);
30+
_exec(`git checkout -b master`);

0 commit comments

Comments
 (0)