diff --git a/scripts/version b/scripts/version new file mode 100755 index 0000000..0413637 --- /dev/null +++ b/scripts/version @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +cd "$(dirname $(dirname "$0"))" || exit + +if [ -z "$1" ]; then + echo "Usage: $0 [version]" + exit 1 +fi + +if [[ ! -z "$(git status -s)" ]]; then + echo "Uncomitted changes" + exit 1 +fi + +poetry version $1 +(cd static && npm version $1 --allow-same-version) +git add . +git commit -m "ci(version): $1" +git tag $1