summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2022-09-06 15:05:37 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2022-09-06 15:15:56 +0200
commit68fef9922edd9add56d97c5bb4d64b6a3179764b (patch)
treeaa4df8541e4fcd9adbf25ad947c1ddd51335111f
parent73468bab7d12fd4d7b62d3b50a56e77acd977607 (diff)
build: Make release.sh generic
The "release.sh" script is a convenient and documented way to release Wayland packages. Unfortunately, the actual package name is hardcoded, meaning that to reuse that script in other Wayland projects, one needs to duplicate the script and amend it. Use meson to determine the actual project name, so that the same script can be invoked from any relevant Wayland project. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rwxr-xr-xrelease.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/release.sh b/release.sh
index 59e6eb0..697bf40 100755
--- a/release.sh
+++ b/release.sh
@@ -33,19 +33,25 @@ if [ "$version" = "$prev_version" ]; then
exit 1
fi
+name="$(meson introspect "$build_dir" --projectinfo | jq -r .descriptive_name)"
+if [ "$name" = "" ]; then
+ echo "Cannot determine project name"
+ exit 1
+fi
+
ninja -C "$build_dir" dist
-archive_name="wayland-$version.tar.xz"
+archive_name="$name-$version.tar.xz"
archive_path="$build_dir/meson-dist/$archive_name"
gpg --detach-sig "$archive_path"
sha256="$(cd $build_dir/meson-dist && sha256sum $archive_name)"
sha512="$(cd $build_dir/meson-dist && sha512sum $archive_name)"
-archive_url="https://gitlab.freedesktop.org/wayland/wayland/-/releases/$version/downloads/$archive_name"
-announce_path="$build_dir/meson-dist/wayland-$version-announce.eml"
+archive_url="https://gitlab.freedesktop.org/wayland/$name/-/releases/$version/downloads/$archive_name"
+announce_path="$build_dir/meson-dist/$name-$version-announce.eml"
cat >"$announce_path" <<EOF
To: <wayland-devel@lists.freedesktop.org>
-Subject: [ANNOUNCE] wayland $version
+Subject: [ANNOUNCE] $name $version
`git shortlog --no-merges "$prev_version.."`
@@ -59,7 +65,7 @@ EOF
echo "Release announcement written to $announce_path"
-echo -n "Release wayland $version? [y/N] "
+echo -n "Release $name $version? [y/N] "
read answer
if [ "$answer" != "y" ]; then
exit 1