diff options
author | EuAndreh <eu@euandre.org> | 2022-01-13 15:02:40 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-01-13 15:02:40 -0300 |
commit | c98d6c8175a1b2fe4452990b6ac19346411b637d (patch) | |
tree | b089c7bf575b58d94951a651be32869a94a2f396 /aux/workflow/dist.sh | |
parent | src/xyz/euandreh/queue.scm: Change pymd4c to upstream repository (diff) | |
download | package-repository-c98d6c8175a1b2fe4452990b6ac19346411b637d.tar.gz package-repository-c98d6c8175a1b2fe4452990b6ac19346411b637d.tar.xz |
aux/: Update
Diffstat (limited to 'aux/workflow/dist.sh')
-rwxr-xr-x | aux/workflow/dist.sh | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh index 15593f4..a433478 100755 --- a/aux/workflow/dist.sh +++ b/aux/workflow/dist.sh @@ -42,13 +42,21 @@ if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi + +if [ "$(git rev-parse --abbrev-ref HEAD)" != 'main' ]; then + echo 'Not on branch "main".' >&2 + exit 1 +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 -N "$PROJECT_UC" -n "$PROJECT" "$VVERSION" -sh aux/workflow/assert-readme.sh -n "$PROJECT" -m "$MAILING_LIST" "$VVERSION" +if ! printf '%s\n%s\n' "$(git tag)" "$VVERSION" | sort -nct. -k1 -k2 -k3; then + echo 'New tag is not bigger than existing ones.' >&2 + exit 1 +fi if [ "$DATE" != "$(git log -1 --format=%cd --date=short HEAD)" ]; then echo "Date '$DATE' is not up-to-date." >&2 @@ -60,21 +68,32 @@ if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then exit 1 fi +make clean public dev-check EXTRA_VERSION="$VVERSION" + if ! (git diff --quiet && git diff --quiet --staged); then echo 'Dirty repository.' exit 1 fi -git tag "$VVERSION" +git tag "$VVERSION" sh aux/workflow/sign-tarballs.sh -n "$PROJECT" -cat <<EOF >&2 +printf 'Publish version? [Y/n]: ' >&2 +read -r publish + +if [ "$publish" = 'n' ]; then + cat <<EOF >&2 Now push the tag and the signature before pushing the commit: -git push origin refs/notes/signatures/tar.xz -o skip-ci --no-verify +git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify git push --tags -o skip-ci --no-verify git push EOF +else + git push origin refs/notes/signatures/tar.gz -o skip-ci --no-verify + git push --tags -o skip-ci --no-verify + git push +fi |