summaryrefslogtreecommitdiffstats
path: root/build-aux/maintainer-upload-release
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:47:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:47:04 +0000
commite05fb7b3e36c052baf0dd607ddeb22c0a2b5cbde (patch)
tree7a27d70e96502edf2b5576d3ca403f1b8512f55b /build-aux/maintainer-upload-release
parentInitial commit. (diff)
downloadgnome-initial-setup-59539b8c5e30eec79ac497e77d7d76ba2be8365f.tar.xz
gnome-initial-setup-59539b8c5e30eec79ac497e77d7d76ba2be8365f.zip
Adding upstream version 43.2.upstream/43.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xbuild-aux/maintainer-upload-release37
1 files changed, 37 insertions, 0 deletions
diff --git a/build-aux/maintainer-upload-release b/build-aux/maintainer-upload-release
new file mode 100755
index 0000000..a5ca951
--- /dev/null
+++ b/build-aux/maintainer-upload-release
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -ex
+: "${MESON_BUILD_ROOT:?}"
+: "${MESON_SOURCE_ROOT:?}"
+project_name="${1:?project name is required}"
+project_version="${2:?project version is required}"
+tarball_basename="${project_name}-${project_version}.tar.xz"
+tarball_path="${MESON_BUILD_ROOT}/meson-dist/${tarball_basename}"
+[[ -e "$tarball_path" ]] # ninja dist must have been successful
+
+gnome_series=${project_version%.*}
+expected_branch=gnome-${gnome_series/./-}
+
+pushd "$MESON_SOURCE_ROOT"
+ branch=$(git rev-parse --abbrev-ref HEAD)
+ if [[ "$branch" != "master" ]] && [[ "$branch" != "$expected_branch" ]]; then
+ echo "Project version $project_version does not match branch $branch" >&2
+ exit 1
+ fi
+ if git show-ref --tags "$project_version" --quiet; then
+ # Tag already exists; verify that it points to HEAD
+ [ "$(git rev-parse "$project_version"^{})" = "$(git rev-parse HEAD)" ]
+ else
+ if type git-evtag &>/dev/null; then
+ # Can't specify tag message on command line
+ # https://github.com/cgwalters/git-evtag/issues/9
+ EDITOR=true git evtag sign "$project_version"
+ else
+ git tag -s "$project_version" -m "Version $project_version"
+ fi
+ fi
+ git push --atomic origin "$branch" "$project_version"
+popd
+
+scp "$tarball_path" master.gnome.org:
+# shellcheck disable=SC2029
+ssh -t master.gnome.org ftpadmin install "$tarball_basename"