Skip to content

Commit

Permalink
Utilize the package version for the compiler build
Browse files Browse the repository at this point in the history
Avoids utilizing the git tag which is failing to build the correct version during a release.
  • Loading branch information
ChadKillingsworth committed Jan 12, 2023
1 parent 17e3ca4 commit a64400e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions build-scripts/build_compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
"use strict";

const ncp = require("ncp");
const fs = require("fs");
const path = require("path");
const runCommand = require("./run-command");
const childProcess = require("child_process");
const packageInfo = require("../package.json");
const semver = require("semver");

/**
* The compiler version that will be built.
Expand All @@ -47,11 +46,7 @@ const childProcess = require("child_process");
*/
const compilerVersion = process.env.COMPILER_NIGHTLY == 'true'
? 'SNAPSHOT-1.0'
: String(
childProcess.execSync('git tag --points-at HEAD', {
cwd: './compiler',
})
).trim();
: `v${semver.major(packageInfo.version)}`;

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

0 comments on commit a64400e

Please sign in to comment.