Skip to content

Commit 8b7ae5c

Browse files
committed
Flip the precedence between OCAML_VERSION and VERSION
1 parent 1f36c23 commit 8b7ae5c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/buildocaml.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,26 @@ function getVersionPrefix() {
1717
if (cached !== undefined) {
1818
return cached;
1919
}
20-
var file = path.join(__dirname, "..", "ocaml", "VERSION");
20+
21+
var file = path.join(__dirname, "..", "OCAML_VERSION");
2122
if (fs.existsSync(file)) {
2223
var version = fs.readFileSync(file, "ascii");
2324
cached = version.substr(0, version.indexOf("+"));
2425
return cached;
2526
}
2627
console.warn(`cannot find '${file}'`);
2728

28-
file = path.join(__dirname, "..", "OCAML_VERSION");
29+
file = path.join(__dirname, "..", "ocaml", "VERSION");
2930
if (fs.existsSync(file)) {
3031
var version = fs.readFileSync(file, "ascii");
3132
cached = version.substr(0, version.indexOf("+"));
3233
return cached;
3334
}
3435
console.warn(`cannot find '${file}'`);
3536

36-
console.warn("You should create OCAML_VERSION or ocaml/VERSION file to specify OCaml version like '4.02.3+buckle-master'");
37+
console.warn(
38+
"You should create OCAML_VERSION or ocaml/VERSION file to specify OCaml version like '4.02.3+buckle-master'"
39+
);
3740
console.warn(`for example,
3841
bucklescript>cat ocaml/VERSION
3942
4.02.3+BS

0 commit comments

Comments
 (0)