33
44let pkg = require ( '../package.json' ) ;
55let version = pkg . version ;
6+ let hybridVersion = require ( '../../angular-hybrid/package.json' ) . version ;
67
7- require ( 'shelljs/global ' ) ;
8+ let shx = require ( 'shelljs' ) ;
89let readlineSync = require ( 'readline-sync' ) ;
910let fs = require ( 'fs' ) ;
1011let path = require ( 'path' ) ;
1112let util = require ( './util' ) ;
1213let _exec = util . _exec ;
1314
14- cd ( path . join ( __dirname , '..' ) ) ;
15+ shx . cd ( path . join ( __dirname , '..' ) ) ;
1516
1617var widen = false ;
1718var coreDep = pkg . dependencies [ '@uirouter/core' ] ;
@@ -22,14 +23,17 @@ if (isNarrow && readlineSync.keyInYN('Widen @uirouter/core dependency from ' + c
2223 widen = false ;
2324}
2425
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?` ) ) {
2630 process . exit ( 1 ) ;
2731}
2832
2933util . ensureCleanMaster ( 'master' ) ;
3034
3135// then tag and push tag
32- _exec ( `git checkout -b ${ version } -artifacts -prep` ) ;
36+ _exec ( `git checkout -b ${ tagname } -prep` ) ;
3337
3438pkg . dependencies [ '@uirouter/core' ] = widenedDep ;
3539fs . writeFileSync ( "package.json" , JSON . stringify ( pkg , undefined , 2 ) ) ;
@@ -39,7 +43,7 @@ _exec('npm run package');
3943
4044_exec ( `git add --force lib lib-esm release package.json` ) ;
4145_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 } ` ) ;
4448_exec ( `git checkout master` ) ;
45- _exec ( `git branch -D ${ version } -artifacts -prep` ) ;
49+ _exec ( `git branch -D ${ tagname } -prep` ) ;
0 commit comments