3
3
4
4
let pkg = require ( '../package.json' ) ;
5
5
let version = pkg . version ;
6
+ let hybridVersion = require ( '../../angular-hybrid/package.json' ) . version ;
6
7
7
- require ( 'shelljs/global ' ) ;
8
+ let shx = require ( 'shelljs' ) ;
8
9
let readlineSync = require ( 'readline-sync' ) ;
9
10
let fs = require ( 'fs' ) ;
10
11
let path = require ( 'path' ) ;
11
12
let util = require ( './util' ) ;
12
13
let _exec = util . _exec ;
13
14
14
- cd ( path . join ( __dirname , '..' ) ) ;
15
+ shx . cd ( path . join ( __dirname , '..' ) ) ;
15
16
16
17
var widen = false ;
17
18
var coreDep = pkg . dependencies [ '@uirouter/core' ] ;
@@ -22,14 +23,17 @@ if (isNarrow && readlineSync.keyInYN('Widen @uirouter/core dependency from ' + c
22
23
widen = false ;
23
24
}
24
25
25
- if ( ! readlineSync . keyInYN ( 'Ready to publish to ' + version + '-artifacts tag?' ) ) {
26
+ let tagname = `${ version } +hybrid-${ hybridVersion } ` ;
27
+ tagname += readlineSync . question ( `Suffix for tag ${ tagname } (optional)?` ) ;
28
+
29
+ if ( ! readlineSync . keyInYN ( `Ready to publish ${ tagname } tag?` ) ) {
26
30
process . exit ( 1 ) ;
27
31
}
28
32
29
33
util . ensureCleanMaster ( 'master' ) ;
30
34
31
35
// then tag and push tag
32
- _exec ( `git checkout -b ${ version } -artifacts -prep` ) ;
36
+ _exec ( `git checkout -b ${ tagname } -prep` ) ;
33
37
34
38
pkg . dependencies [ '@uirouter/core' ] = widenedDep ;
35
39
fs . writeFileSync ( "package.json" , JSON . stringify ( pkg , undefined , 2 ) ) ;
@@ -39,7 +43,7 @@ _exec('npm run package');
39
43
40
44
_exec ( `git add --force lib lib-esm release package.json` ) ;
41
45
_exec ( `git commit -m 'chore(*): commiting build files'` ) ;
42
- _exec ( `git tag ${ version } -artifacts ` ) ;
43
- _exec ( `git push -u origin ${ version } -artifacts ` ) ;
46
+ _exec ( `git tag ${ tagname } ` ) ;
47
+ _exec ( `git push -u origin ${ tagname } ` ) ;
44
48
_exec ( `git checkout master` ) ;
45
- _exec ( `git branch -D ${ version } -artifacts -prep` ) ;
49
+ _exec ( `git branch -D ${ tagname } -prep` ) ;
0 commit comments