#!/usr/bin/env bash parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P ) cd "$parent_path" || exit if [ 1 -ne "$#" ] then echo "Usage: `basename $0` Version: eg. 9.0.0" exit 0 fi sed --in-place --regexp-extended 's/"([0-9].[0-9].[0-9])"/"'"$1"'"/g' barker/barker/__version__.py git add barker/barker/__version__.py sed --in-place --regexp-extended 's/version = "([0-9].[0-9].[0-9])"/version = "'"$1"'"/g' barker/pyproject.toml git add barker/pyproject.toml sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' bookie/src/environments/environment.prod.ts git add bookie/src/environments/environment.prod.ts sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' bookie/src/environments/environment.ts git add bookie/src/environments/environment.ts sed --in-place --regexp-extended 's/"version": "([0-9].[0-9].[0-9])"/"version": "'"$1"'"/g' bookie/package.json git add bookie/package.json git commit -m "Version Bump v$1" git push git tag --delete latest git tag latest git tag "v$1" git push --delete origin latest git push --tags