Skip to content

Commit 6c9acdc

Browse files
committed
Set version to 0.10.0 and include ReScript commit hash in version string.
1 parent 3e9ec29 commit 6c9acdc

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

bin/Version.re

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
let version = "0.9.1";
1+
// *** GENERATED BY "yarn setVersion" ***
2+
3+
let version = "0.10.0 (ReScript 7cc70c9)";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bs-react-intl-extractor",
3-
"version": "0.9.1",
3+
"version": "0.10.0",
44
"description": "Message extractor for bs-react-intl",
55
"author": "Christoph Knittel <christoph.knittel@cca.io>",
66
"license": "MIT",

scripts/setVersion.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
const fs = require("fs");
2-
const { version } = require("../package.json");
2+
const child_process = require("child_process");
33

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+
);
523

624
console.log(`Version set to ${version}`);

0 commit comments

Comments
 (0)