#!/usr/bin/env bash
-# Usage: scripts/send.sh rfcs/p1
# SPDX-FileCopyrightText: 2024 Julien Moutinho (adh14) <julm+rezine@autogeree.net>
# SPDX-License-Identifier: AGPL-3.0-or-later
# shellcheck disable=SC2046
# shellcheck disable=SC2086
# shellcheck disable=SC2317
+# To push and send mails:
+# scripts/send.sh rfcs/p1
+# To push without sending mails:
+# scripts/send.sh rfcs/p1 no_git_send_email=set git_push=--force
set -eux
. "${0%/*}"/lib.sh
rfcDir=$1; shift
if test ! "${no_git_push:+set}"; then
git push ${git_push-} --follow-tags "$git_push_remote" "$rfcTag"
- git push ${git_push-} "$git_push_remote" "$(git rev-list "$rfcTag" -1):${rfcBranch}"
+ rfcTagRev=$(git rev-list "$rfcTag" -1)
+ git push ${git_push-} "$git_push_remote" "$rfcTagRev:refs/heads/$rfcBranch"
+ git push ${git_push-} "$git_push_remote" "$rfcTagRev:refs/heads/${rfcBranch}v$rfcRevAdvocacy"
git push ${git_push-} "$git_push_remote"
fi