aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/dist.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-24 18:17:26 -0300
committerEuAndreh <eu@euandre.org>2021-07-04 17:07:50 -0300
commit4dcfbd67afca57dbb21109579f825e60312b7f41 (patch)
tree0b41cc75ad6b2f2515658f93d4fc60f686c8aa78 /aux/workflow/dist.sh
parentnix/: Remove (diff)
downloadeuandre.org-4dcfbd67afca57dbb21109579f825e60312b7f41.tar.gz
euandre.org-4dcfbd67afca57dbb21109579f825e60312b7f41.tar.xz
aux/: Update
Diffstat (limited to '')
-rwxr-xr-xaux/workflow/dist.sh61
1 files changed, 53 insertions, 8 deletions
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index ee67f24..69c0173 100755
--- a/aux/workflow/dist.sh
+++ b/aux/workflow/dist.sh
@@ -1,19 +1,54 @@
#!/bin/sh
set -eu
-DATE="$1"
-VVERSION="v$2"
-PROJECT_UC="$3"
-PROJECT="$4"
-MAILING_LIST="$5"
+PROJECT_UC=
+while getopts 'd:V:n:N:m:' flag; do
+ case "$flag" in
+ d)
+ DATE="$OPTARG"
+ ;;
+ V)
+ VVERSION="v$OPTARG"
+ ;;
+ n)
+ PROJECT="$OPTARG"
+ ;;
+ N)
+ PROJECT_UC="$OPTARG"
+ ;;
+ m)
+ MAILING_LIST="$OPTARG"
+ ;;
+ *)
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+assert_arg() {
+ if [ -z "$1" ]; then
+ echo "Missing $2" >&2
+ exit 2
+ fi
+}
+
+assert_arg "${DATE:-}" '-d DATE'
+assert_arg "${VVERSION:-}" '-V VERSION'
+assert_arg "${PROJECT:-}" '-n PROJECT'
+assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST'
+
+if [ -z "${PROJECT_UC:-}" ]; then
+ PROJECT_UC="$PROJECT"
+fi
if git show "$VVERSION" 1>/dev/null 2>/dev/null; then
echo "Version '$VVERSION' already exists." >&2
exit 1
fi
-sh aux/workflow/assert-changelog.sh "$PROJECT_UC" "$PROJECT" "$VVERSION"
-sh aux/workflow/assert-readme.sh "$PROJECT" "$MAILING_LIST" "$VVERSION"
+sh aux/workflow/assert-changelog.sh -N "$PROJECT_UC" -n "$PROJECT" "$VVERSION"
+sh aux/workflow/assert-readme.sh -n "$PROJECT" -m "$MAILING_LIST" "$VVERSION"
if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then
echo "Date '$DATE' is not up-to-date." >&2
@@ -32,4 +67,14 @@ fi
git tag "$VVERSION"
-sh aux/workflow/sign-tarballs.sh "$PROJECT"
+sh aux/workflow/sign-tarballs.sh -n "$PROJECT"
+
+
+cat <<EOF >&2
+Now push the tag and the signature before pushing the commit:
+
+git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify
+git push --tags -o skip-ci --no-verify
+git push
+
+EOF