aboutsummaryrefslogblamecommitdiff
path: root/aux/workflow/dist.sh
blob: 45fc30a71be41bc92960a26d0c9c17e6a444ddc5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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"