File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 11#!env node
22"use strict" ;
3-
4- const version = require ( '../package.json' ) . version ;
3+ const fs = require ( 'fs' ) ;
4+ const path = require ( 'path' ) ;
55const util = require ( '@uirouter/publish-scripts/util' ) ;
6- const _exec = util . _exec ;
6+ const version = require ( '../package.json' ) . version ;
7+ // const _exec = util._exec;
8+ const _exec = console . log . bind ( console ) ;
9+
10+ util . packageDir ( ) ;
11+ const bowerPath = path . resolve ( __dirname , '..' , 'bower.json' ) ;
12+ const bower = JSON . parse ( fs . readFileSync ( bowerPath ) ) ;
13+ // util.ensureCleanMaster('master');
714
8- util . ensureCleanMaster ( 'master' ) ;
15+ // update bower.json
16+ bower . version = version ;
17+ fs . writeFileSync ( bowerPath , JSON . stringify ( bower , null , 2 ) ) ;
18+ _exec ( `git commit -m 'chore(bower): Update bower.json' bower.json` ) ;
919
1020// branch, add/commit release files, and push to bower repository
1121_exec ( `git checkout -b bower-${ version } ` ) ;
You can’t perform that action at this time.
0 commit comments