Skip to content

Commit

Permalink
Remove short commit hash to prevent version collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Sep 9, 2024
1 parent 3a954e3 commit b3b4bb8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
4 changes: 1 addition & 3 deletions .github/scripts/get-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ if (!isGitTag && !isGitBranch && !isGitPullRequest) {
}

const gitCommitHash = process.env.GITHUB_SHA;
const gitShortCommitHash = child_process.execSync('git rev-parse --short HEAD').toString().trim();

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

// Add the git commit hash to the version string
currentVersion += `+${gitShortCommitHash}`;
currentVersion += `+${gitCommitHash}`;
} else {
if (latestRelease.prerelease.length > 0) {
currentVersion += `-${latestRelease.prerelease.join('.')}`;
Expand Down
4 changes: 0 additions & 4 deletions scripts/embed_env_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ def transform_cpp_define_string(k: str, v: str) -> str:
if v.startswith('"') and v.endswith('"'):
v = v[1:-1]

# Special case for OPENSHOCK_FW_GIT_COMMIT.
if k == 'OPENSHOCK_FW_GIT_COMMIT' and len(v) > 7:
v = v[0:7]

return env.StringifyMacro(v)


Expand Down

0 comments on commit b3b4bb8

Please sign in to comment.