From 403c27e0728bbd51fbefa6aa5e7d325a63ff1331 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Fri, 7 Nov 2025 13:54:39 +0100 Subject: [PATCH] umpf: push umpf-base as well umpf-base is often a tag from a different repository, which may not be available (or added as remote) to everyone trying to rebuild an umpf. Let's push the base too to make it possible to reproduce the umpf. Signed-off-by: Ahmad Fatoum --- umpf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/umpf b/umpf index 91d4f64..5c4891c 100755 --- a/umpf +++ b/umpf @@ -1895,6 +1895,10 @@ do_distribute() { ### namespace: push ### +push_base() { + echo "${content}" > "${STATE}/base-name" +} + push_topic() { echo "${content}" >> "${STATE}/topic-names" } @@ -1936,6 +1940,7 @@ do_push () { prepare_persistent push "${@}" parse_series push "${STATE}/series" + local base="$(<"${STATE}/base-name")" local tagname="$(<"${STATE}/tagname")" local tagrevf="$(<"${STATE}/tagrev-flat")" @@ -1992,7 +1997,10 @@ do_push () { args+=("${topics[$topic]}:${topic}") done - # Push tag again to avoid an error if $args is empty + if [ -n "$(${GIT} rev-parse --symbolic-full-name "${base}")" ]; then + args+=("${base}") + fi + ${GIT} push "${opts[@]}" ${remote} -- "${tagname}" "${args[@]}" cleanup