Skip to content

Commit

Permalink
Partially revert "Remove short commit hash to prevent version collisi…
Browse files Browse the repository at this point in the history
…ons"

This reverts commit b3b4bb8.
  • Loading branch information
hhvrc committed Sep 9, 2024
1 parent b3b4bb8 commit f4c8092
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/get-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (!isGitTag && !isGitBranch && !isGitPullRequest) {
}

const gitCommitHash = process.env.GITHUB_SHA;
const gitShortCommitHash = gitCommitHash.substring(0, 8);

if (gitCommitHash === undefined) {
core.setFailed('Environment variable "GITHUB_SHA" not found');
process.exit();
Expand Down Expand Up @@ -83,7 +85,7 @@ if (!isGitTag) {
}

// Add the git commit hash to the version string
currentVersion += `+${gitCommitHash}`;
currentVersion += `+${gitShortCommitHash}`;
} else {
if (latestRelease.prerelease.length > 0) {
currentVersion += `-${latestRelease.prerelease.join('.')}`;
Expand Down

0 comments on commit f4c8092

Please sign in to comment.