appropri(scripts): create a branch per version of an RFC
authorJulien Moutinho (adh14) <julm+rezine@sourcephile.fr>
Tue, 22 Oct 2024 22:49:09 +0000 (00:49 +0200)
committerJulien Moutinho (adh14) <julm+rezine@sourcephile.fr>
Mon, 28 Oct 2024 00:41:31 +0000 (01:41 +0100)
This enables to make a permanent link to a specific version,
to which only the content of criticisms can be updated,
not the content of the advocacy.

scripts/send.sh

index 1b643303457f4389de847c1b3c61e16deb7e5223..2e3bb17acee95926df4121ee73cc1b090fc1a0d3 100755 (executable)
@@ -1,10 +1,13 @@
 #!/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
@@ -105,6 +108,8 @@ fi
 
 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