diff --git a/.github/scripts/get-vars.js b/.github/scripts/get-vars.js index 90cb22f2..b03b8eb5 100644 --- a/.github/scripts/get-vars.js +++ b/.github/scripts/get-vars.js @@ -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(); @@ -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('.')}`; diff --git a/scripts/embed_env_vars.py b/scripts/embed_env_vars.py index 49bc04a5..6ca70337 100644 --- a/scripts/embed_env_vars.py +++ b/scripts/embed_env_vars.py @@ -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)