release: use runc-$version.tar.xz as archive name

Because we add the runc-$version/ prefix to the archive we generate,
including the version in the name makes it easier for some tools to
operate on as it matches most other projects (for openSUSE we rename the
archive file to this format in order for the automated RPM scripts to
work properly).

Also, when doing several releases at the same time, being able to
double-check that the correct artefact versions were uploaded for each
release can be quite handy.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2025-11-30 12:09:22 +11:00
parent 20a9532fd0
commit 7c8fccd646
2 changed files with 6 additions and 6 deletions

View File

@@ -161,8 +161,6 @@ done
version="${version:-$(<"$root/VERSION")}"
releasedir="${releasedir:-release/$version}"
hashcmd="${hashcmd:-sha256sum}"
# Suffixes of files to checksum/sign.
suffixes=("${arches[@]}" tar.xz)
log "creating $project release in '$releasedir'"
log " version: $version"
@@ -179,11 +177,13 @@ rm -rf "$releasedir" && mkdir -p "$releasedir"
build_project "$releasedir/$project" "$native_arch" "${arches[@]}"
# Generate new archive.
git archive --format=tar --prefix="$project-$version/" "$commit" | xz >"$releasedir/$project.tar.xz"
git archive --format=tar --prefix="$project-$version/" "$commit" | xz >"$releasedir/$project-$version.tar.xz"
# Generate sha256 checksums for binaries and libseccomp tarball.
(
cd "$releasedir"
# Add $project. prefix to all suffixes.
"$hashcmd" "${suffixes[@]/#/$project.}" >"$project.$hashcmd"
# Add hash of all architecture binaries ($project.$arch).
"$hashcmd" "${arches[@]/#/$project.}" >>"$project.$hashcmd"
# Add hash of tarball ($project-$version.tar.xz).
"$hashcmd" "$project-$version.tar.xz" >>"$project.$hashcmd"
)

View File

@@ -135,7 +135,7 @@ read -r
[ -w "$releasedir" ] || sudo chown -R "$(id -u):$(id -g)" "$releasedir"
# Sign everything.
for bin in "$releasedir/$project".*; do
for bin in "$releasedir/$project"*; do
[[ "$(basename "$bin")" == "$project.$hashcmd" ]] && continue # skip hash
gpg "${gpgflags[@]}" --detach-sign --armor "$bin"
done