]>
Git — Sourcephile - julm/rezine-rfcs.git/blob - scripts/send.sh
2 # Usage: scripts/send.sh rfcs/p1
3 # SPDX-FileCopyrightText: 2024 Julien Moutinho (adh14) <julm+rezine@autogeree.net>
4 # SPDX-License-Identifier: AGPL-3.0-or-later
5 # shellcheck disable=SC2046
6 # shellcheck disable=SC2086
7 # shellcheck disable=SC2317
11 test $# -le 0 || declare "$@"
14 removeAtExit
+=("$coverLetter")
15 mimepart_alternative
=$(uuidgen)
16 mimepart_related
=$(uuidgen)
21 #rfcPDF -o "$rfcDir/${rfcRepo}-${rfcTag}".pdf
23 git_push_remote
=${git_push_remote-origin}
25 if test ! "${no_git_send_email:+set}"; then
30 --template "${0%/*}"/..
/styles
/rfc.header.
mail \
34 Content-Disposition: inline
36 Content-Type: multipart/alternative; boundary="--==_mimepart_alternative_$mimepart_alternative"
37 Content-Transfer-Encoding: UTF-8
42 ----==_mimepart_alternative_$mimepart_alternative
43 Content-Type: text/plain; charset=UTF-8
44 Content-Transfer-Encoding: UTF-8
48 Vous lisez actuellement ce mél dans son format de texte brut,
49 vous _devriez_ le lire dans son format HTML, qui est plus soigné.
57 ----==_mimepart_alternative_$mimepart_alternative
58 Content-Type: multipart/related; boundary="--==_mimepart_related_$mimepart_related"
59 Content-Transfer-Encoding: UTF-8
61 ----==_mimepart_related_$mimepart_related
62 Content-Type: text/html; charset=UTF-8
63 Content-Transfer-Encoding: UTF-8
66 cat "$rfcDir"/index.html
68 ----==_mimepart_related_$mimepart_related
70 ----==_mimepart_alternative_$mimepart_alternative
74 # FIXME: the PDF rendition is not good
76 #----==_mimepart_mixed_$mimepart_mixed
77 #Content-Type: application/pdf; name="RFC$rfcTag.pdf"
78 #Content-Transfer-Encoding: base64
79 #Content-Disposition: attachment; filename*0="RFC$rfcTag."; filename*1=pdf
82 #base64 --wrap 76 "$rfcDir/$rfcRepo-$rfcTag".pdf
86 patchesDir
=$(mktemp -d)
87 removeAtExit
+=("$patchesDir")
88 git format
-patch "${git_push_remote}/${rfcBranch}..$rfcTag" \
89 --output-directory "$patchesDir" \
92 rfcAdvocacyMeta
=$(mktemp --suffix ".json")
93 removeAtExit
+=("$rfcAdvocacyMeta")
94 pandoc
-o "$rfcAdvocacyMeta" --to plain \
95 --template "$rfcRoot"/styles
/metadata.json \
97 git send
-email ${git_send_email-} \
98 --to "$(jq -r .To <"$rfcAdvocacyMeta" | sed -e '/^null$/d')" \
99 --cc "$(jq -r .Cc <"$rfcAdvocacyMeta" | sed -e '/^null$/d')" \
101 --8bit-encoding UTF
-8 \
102 --cover-letter "$coverLetter" \
106 if test ! "${no_git_push:+set}"; then
107 git push
${git_push-} --follow-tags "$git_push_remote" "$rfcTag"
108 git push
${git_push-} "$git_push_remote" "$(git rev-list "$rfcTag" -1):${rfcBranch}"
109 git push
${git_push-} "$git_push_remote"