mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 14:36:58 +02:00
sdk_lib: Encode full sha into version for dev builds in github actions
This gives emerge-gitclone the full sha so that it can fetch by hash from the remote repository, which lets it succeed for PRs from external contributors. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
parent
afbaf34e4d
commit
95f036d9f7
@ -55,7 +55,12 @@ function yell() {
|
|||||||
function get_git_version() {
|
function get_git_version() {
|
||||||
local tag="$(git tag --points-at HEAD)"
|
local tag="$(git tag --points-at HEAD)"
|
||||||
if [ -z "$tag" ] ; then
|
if [ -z "$tag" ] ; then
|
||||||
git describe --tags
|
local abbrev=
|
||||||
|
# emerge-gitclone needs the full SHA for external PRs
|
||||||
|
if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
|
||||||
|
abbrev="--abbrev=40"
|
||||||
|
fi
|
||||||
|
git describe --tags ${abbrev}
|
||||||
else
|
else
|
||||||
echo "$tag"
|
echo "$tag"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user