File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11/**
22 * 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.
4+ * Side Note: Versions above 0.0.0 e.g. 0.0.1-dev-[hash] do work with pod install.
45 */
56const fs = require ( 'fs' ) ;
67const path = require ( 'path' ) ;
7- const version = require ( '../package.json' ) . version ;
8+ const version = process . argv [ 2 ] ;
89
9- if ( version . includes ( '- ' ) ) {
10+ if ( version . includes ( '0.0.0 ' ) ) {
1011 console . log ( `Storing current version for dev version ${ version } ` ) ;
11-
12+ const currentPackage = JSON . parse ( fs . readFileSync ( path . resolve ( __dirname , '../package.json' ) , 'utf-8' ) ) ;
13+ // Backup the current version
1214 fs . writeFileSync (
1315 path . join ( __dirname , '../meta.json' ) ,
14- JSON . stringify ( { version : version . split ( '-' ) [ 0 ] } , null , '\t' )
16+ JSON . stringify ( { version : currentPackage . version } , null , '\t' )
1517 ) ;
1618}
You can’t perform that action at this time.
0 commit comments