From b5333608e9d4826fcb6dc497a9e94e162267a84c Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 30 Jun 2022 15:37:17 -0500 Subject: [PATCH] Stamp source tarballs with the commit hash --- .github/workflows/source-tarball.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/source-tarball.yml b/.github/workflows/source-tarball.yml index 8bc06221..cc3c4101 100644 --- a/.github/workflows/source-tarball.yml +++ b/.github/workflows/source-tarball.yml @@ -21,7 +21,12 @@ jobs: dir_name="solvespace-${version}" archive_name="${dir_name}.tar.xz" archive_path="${HOME}/${archive_name}" - + commit_sha="$GITHUB_SHA" + + sed -e 's/^\(include(GetGitCommitHash)\)/#\1/' \ + -e 's/^# \(set(GIT_COMMIT_HASH\).*/\1 '"$commit_sha"')/' \ + -i CMakeLists.txt + echo "::set-output name=archive_name::${archive_name}" echo "::set-output name=archive_path::${archive_path}"