From dbf0ecf0d82a1f29294a30ca54c886dd12a804a9 Mon Sep 17 00:00:00 2001 From: tanshu Date: Fri, 10 Sep 2021 13:26:16 +0530 Subject: [PATCH] Updated the deploy and version_bump scripts --- deploy.sh | 7 +------ version_bump.sh | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/deploy.sh b/deploy.sh index 999ee4b1..07d12cb9 100755 --- a/deploy.sh +++ b/deploy.sh @@ -8,12 +8,7 @@ if [ 1 -eq "$#" ] then ./version_bump.sh "$1" else -echo "No version bump" - git push - git tag --delete latest - git tag latest - git push --delete origin latest - git push --tags + ./version_bump.sh fi cd "$parent_path/docker/app" || exit diff --git a/version_bump.sh b/version_bump.sh index 65ce17a9..cca9ba64 100755 --- a/version_bump.sh +++ b/version_bump.sh @@ -4,23 +4,24 @@ cd "$parent_path" || exit if [ 1 -ne "$#" ] then - echo "Usage: `basename $0` Version: eg. 9.0.0" - exit 0 + echo "Version bump to $1" + sed --in-place --regexp-extended 's/"([0-9].[0-9].[0-9])"/"'"$1"'"/g' brewman/brewman/__version__.py + git add brewman/brewman/__version__.py + sed --in-place --regexp-extended 's/version = "([0-9].[0-9].[0-9])"/version = "'"$1"'"/g' brewman/pyproject.toml + git add brewman/pyproject.toml + sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' overlord/src/environments/environment.prod.ts + git add overlord/src/environments/environment.prod.ts + sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' overlord/src/environments/environment.ts + git add overlord/src/environments/environment.ts + sed --in-place --regexp-extended 's/"version": "([0-9].[0-9].[0-9])"/"version": "'"$1"'"/g' overlord/package.json + git add overlord/package.json + git commit -m "Version Bump v$1" + git tag "v$1" +else + echo "No version bump" fi -sed --in-place --regexp-extended 's/"([0-9].[0-9].[0-9])"/"'"$1"'"/g' brewman/brewman/__version__.py -git add brewman/brewman/__version__.py -sed --in-place --regexp-extended 's/version = "([0-9].[0-9].[0-9])"/version = "'"$1"'"/g' brewman/pyproject.toml -git add brewman/pyproject.toml -sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' overlord/src/environments/environment.prod.ts -git add overlord/src/environments/environment.prod.ts -sed --in-place --regexp-extended 's/version: '\''([0-9].[0-9].[0-9])'\''/version: '\'"$1"\''/g' overlord/src/environments/environment.ts -git add overlord/src/environments/environment.ts -sed --in-place --regexp-extended 's/"version": "([0-9].[0-9].[0-9])"/"version": "'"$1"'"/g' overlord/package.json -git add overlord/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