File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 1
- let version = "0.9.1" ;
1
+ // *** GENERATED BY "yarn setVersion" ***
2
+
3
+ let version = "0.10.0 (ReScript 7cc70c9)" ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " bs-react-intl-extractor" ,
3
- "version" : " 0.9.1 " ,
3
+ "version" : " 0.10.0 " ,
4
4
"description" : " Message extractor for bs-react-intl" ,
5
5
"author" : " Christoph Knittel <christoph.knittel@cca.io>" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change 1
1
const fs = require ( "fs" ) ;
2
- const { version } = require ( "../package.json " ) ;
2
+ const child_process = require ( "child_process " ) ;
3
3
4
- fs . writeFileSync ( "bin/Version.re" , `let version = "${ version } ";\n` ) ;
4
+ const packageJson = fs . readFileSync ( "package.json" ) ;
5
+ const packageVersion = JSON . parse ( packageJson ) . version ;
6
+
7
+ const reScriptVersion = child_process
8
+ . execSync ( "git submodule" )
9
+ . toString ( )
10
+ . trim ( )
11
+ . split ( " " ) [ 0 ]
12
+ . substr ( 0 , 7 ) ;
13
+
14
+ const version = `${ packageVersion } (ReScript ${ reScriptVersion } )` ;
15
+
16
+ fs . writeFileSync (
17
+ "bin/Version.re" ,
18
+ `// *** GENERATED BY "yarn setVersion" ***
19
+
20
+ let version = "${ version } ";
21
+ `
22
+ ) ;
5
23
6
24
console . log ( `Version set to ${ version } ` ) ;
You can’t perform that action at this time.
0 commit comments