Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion umpf
Original file line number Diff line number Diff line change
Expand Up @@ -1895,6 +1895,10 @@ do_distribute() {

### namespace: push ###

push_base() {
echo "${content}" > "${STATE}/base-name"
}

push_topic() {
echo "${content}" >> "${STATE}/topic-names"
}
Expand Down Expand Up @@ -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")"

Expand Down Expand Up @@ -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
Expand Down