File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11/**
2- * Dev package version like 0.0.0-dev-hash seem to cause issues with the podspec
2+ * Dev package version like 0.0.0-dev-[ hash] seem to cause issues with the podspec
33 * This script will remove the -dev-hash from the version.
44 */
55const fs = require ( 'fs' ) ;
66const path = require ( 'path' ) ;
7- const version = process . argv [ 2 ] ;
7+ const version = require ( '../package.json' ) . version ;
88
9- if ( version . includes ( '0.0.0 ' ) ) {
9+ if ( version . includes ( '- ' ) ) {
1010 console . log ( `Storing current version for dev version ${ version } ` ) ;
11- const currentPackage = JSON . parse ( fs . readFileSync ( path . resolve ( __dirname , '../package.json' ) , 'utf-8' ) ) ;
12- // Backup the current version
11+
1312 fs . writeFileSync (
1413 path . join ( __dirname , '../meta.json' ) ,
15- JSON . stringify ( { version : currentPackage . version } , null , '\t' )
14+ JSON . stringify ( { version : version . split ( '-' ) [ 0 ] } , null , '\t' )
1615 ) ;
1716}
You can’t perform that action at this time.
0 commit comments