Skip to content

Commit

Permalink
ci: don't add major tag unless we're on main
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Dec 10, 2024
1 parent 04d5e08 commit a2b8b0b
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions bin/set-major-version-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,12 @@ async function runGitCmd(args) {
*/
async function setMajorVersionTag() {
try {
console.log(
'kanad test',
JSON.stringify({
GITHUB_BASE_REF: process.env.GITHUB_BASE_REF,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF,
GITHUB_REF: process.env.GITHUB_REF,
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME,
GITHUB_REF_PROTECTED: process.env.GITHUB_REF_PROTECTED,
GITHUB_REF_TYPE: process.env.GITHUB_REF_TYPE,
GITHUB_WORKFLOW_REF: process.env.GITHUB_WORKFLOW_REF,
}),
);
// The major version tag should only be set when releasing on the `main` branch
if (process.env.GITHUB_REF !== 'refs/heads/main') {
// eslint-disable-next-line no-console
console.warn(`Running with the following ref: ${process.env.GITHUB_REF || 'n/a'}, not setting major version tag`);
return;
}

const parsedVersion = parse(pkg.version);

Expand Down

0 comments on commit a2b8b0b

Please sign in to comment.