aboutsummaryrefslogtreecommitdiff
path: root/aux
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-02-21 21:09:51 -0300
committerEuAndreh <eu@euandre.org>2021-02-21 21:09:51 -0300
commit01a385abbfac35eb55be742b4cc027950340ea67 (patch)
treeda7a3c90597d43be3c4fc185f200db145f3f2217 /aux
parentRelease v0.2.0 (diff)
downloadremembering-01a385abbfac35eb55be742b4cc027950340ea67.tar.gz
remembering-01a385abbfac35eb55be742b4cc027950340ea67.tar.xz
Move "dist" target to aux/workflow/dist.sh
Diffstat (limited to 'aux')
-rwxr-xr-xaux/workflow/dist.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
new file mode 100755
index 0000000..bc01a8f
--- /dev/null
+++ b/aux/workflow/dist.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+DATE="$1"
+VERSION="v$2"
+
+if git show "$VERSION" 1>/dev/null 2>/dev/null; then
+ echo 'Version "$VERSION" already exists.'
+ exit 1
+fi
+
+if [ '$DATE' != "$(git log -1 --format=%cd --date=short HEAD)" ]; then
+ echo 'Date "$DATE" is not up-to-date.'
+ exit 1
+fi
+
+git tag "$VERSION"