Skip to content

Commit a64400e

Browse files
Utilize the package version for the compiler build
Avoids utilizing the git tag which is failing to build the correct version during a release.
1 parent 17e3ca4 commit a64400e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

build-scripts/build_compiler.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
"use strict";
3333

3434
const ncp = require("ncp");
35-
const fs = require("fs");
36-
const path = require("path");
3735
const runCommand = require("./run-command");
38-
const childProcess = require("child_process");
36+
const packageInfo = require("../package.json");
37+
const semver = require("semver");
3938

4039
/**
4140
* The compiler version that will be built.
@@ -47,11 +46,7 @@ const childProcess = require("child_process");
4746
*/
4847
const compilerVersion = process.env.COMPILER_NIGHTLY == 'true'
4948
? 'SNAPSHOT-1.0'
50-
: String(
51-
childProcess.execSync('git tag --points-at HEAD', {
52-
cwd: './compiler',
53-
})
54-
).trim();
49+
: `v${semver.major(packageInfo.version)}`;
5550

5651
const compilerTargetName = compilerVersion === 'SNAPSHOT-1.0' || parseInt(compilerVersion.slice(1), 10) > 20221004 ?
5752
'compiler_uberjar_deploy.jar' : 'compiler_unshaded_deploy.jar';

0 commit comments

Comments
 (0)