#!/bin/sh -e

make check

new_tag="$1"

git_dir="$(git rev-parse --absolute-git-dir)"
root_dir="$(realpath "$git_dir"/..)"

sed -i "s|release = .*|release = \"$new_tag\"|" "$root_dir"/web/conf.py

git add "$root_dir"/web/conf.py

git commit -m "bump versions $new_tag"
