barker/version_bump.sh
Amritanshu 2495c24e1a Chore: Updated python dependencies
Chore: Updated angular to v19
Chore: Refactored ops with docker and ansible
2024-12-16 17:58:17 +05:30

29 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" || exit ; pwd -P )
cd "$parent_path" || exit
if [ 1 -eq "$#" ]
then
echo "Version bump to $1"
sed --in-place --regexp-extended 's/"([0-9]{1,2}.[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]{1,2}.[0-9].[0-9])"/version = "'"$1"'"/g' barker/pyproject.toml
git add barker/pyproject.toml
sed --in-place --regexp-extended 's/version = "([0-9]{1,2}.[0-9].[0-9])"/version = "'"$1"'"/g' frank/pyproject.toml
git add frank/pyproject.toml
sed --in-place --regexp-extended 's/version: '\''([0-9]*.[0-9].[0-9])'\''/version: '\'"$1"\''/g' bookie/src/app/app.environment.ts
git add bookie/src/app/app.environment.ts
sed --in-place --regexp-extended 's/"version": "([0-9]{1,2}.[0-9].[0-9])"/"version": "'"$1"'"/g' bookie/package.json
git add bookie/package.json
git commit -m "Version Bump v$1"
git tag "v$1"
else
echo "No version bump"
fi
git push
git tag --delete latest
git tag latest
git push --delete origin latest
git push --tags