File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 39
39
"outputs" : [],
40
40
"options" : {
41
41
"commands" : [
42
+ " ts-node ./scripts/set-version.ts" ,
42
43
" conventional-changelog --preset angular --infile CHANGELOG.md --same-file --release-count 1" ,
43
44
" git add -A"
44
45
],
Original file line number Diff line number Diff line change
1
+ import { readJson , writeJson } from 'fs-extra' ;
2
+
3
+ const packagesGlob = './libs/ng2-dragula/package.json' ;
4
+ const mainPackage = './package.json' ;
5
+
6
+ ( async ( ) => {
7
+ const version = await readJson ( mainPackage ) . then ( json => json . version ) ;
8
+ const packages = [ packagesGlob ]
9
+ . map ( async packagePath => {
10
+ const packageJson = await readJson ( packagePath ) ;
11
+ if ( packageJson . version ) {
12
+ packageJson . version = version ;
13
+ }
14
+
15
+ await writeJson ( packagePath , packageJson , { spaces : 2 } ) ;
16
+ } ) ;
17
+
18
+ await Promise . all ( packages ) ;
19
+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments