Skip to content

Commit 57b717b

Browse files
committed
create_source_tarball.sh: Use prerelease name from prerelease.txt when available instead of hard-coding "nightly"
1 parent 2aa0234 commit 57b717b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/create_source_tarball.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ source "${REPO_ROOT}/scripts/common.sh"
88
cd "$REPO_ROOT"
99
version=$(scripts/get_version.sh)
1010
commit_hash=$(git rev-parse --short=8 HEAD)
11-
commit_date=$(git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./')
1211

1312
# File exists and has zero size -> not a prerelease
1413
if [[ -e prerelease.txt && ! -s prerelease.txt ]]; then
1514
version_string="$version"
15+
elif [[ -e prerelease.txt ]]; then
16+
version_string="${version}-$(cat prerelease.txt)-${commit_hash}"
1617
else
18+
commit_date=$(git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./')
1719
version_string="${version}-nightly-${commit_date}-${commit_hash}"
1820
fi
1921

0 commit comments

Comments
 (0)