Skip to content

Commit

Permalink
update the gitlab build variables
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Dec 12, 2024
1 parent 75f9779 commit 548551b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions release/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ async function main(args) {
}

let version = "head";
if (process.env.CI_BUILD_TAG) {
version = process.env.CI_BUILD_TAG;
if (process.env.CI_COMMIT_TAG) {
version = process.env.CI_COMMIT_TAG;
} else if (
process.env.CI_BUILD_REF_NAME &&
process.env.CI_BUILD_REF_NAME !== "master"
process.env.CI_COMMIT_REF_NAME &&
process.env.CI_COMMIT_REF_NAME !== "master"
) {
version = process.env.CI_BUILD_REF_NAME;
version = process.env.CI_COMMIT_REF_NAME
}
let buildRef = process.env.CI_BUILD_REF || "no-commit";
let buildRef = process.env.CI_COMMIT_SHA || "no-commit";

let builtAt = $$("date +%s");
let ldFlags = `-X main.version=${version} -X main.builtAt=${builtAt} -X main.commit=${buildRef} -X main.target=${opts.target} -w -s`;
Expand Down

0 comments on commit 548551b

Please sign in to comment.