Skip to content

Commit

Permalink
update bump_version to use shell script (#26801)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpdeethree committed May 30, 2023
1 parent bf8bb6a commit b32357c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tools/bin/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,29 @@ if ! test "$(tty)" == "not a tty"; then
fi

set -o xtrace
PREV_VERSION=$(grep -w VERSION gradle.properties | cut -d"=" -f2)
REPO=$(git ls-remote --get-url | xargs basename -s .git)
echo $REPO
if [ "$REPO" == "airbyte" ]; then
PREV_VERSION=$(grep -w VERSION run-ab-platform.sh | cut -d"=" -f2)
echo "Bumping version for Airbyte"
else
PREV_VERSION=$(grep -w VERSION .env | cut -d"=" -f2)
echo "Bumping version for Airbyte Platform"
fi

GIT_REVISION=$(git rev-parse HEAD)

pip install bumpversion
bumpversion "$PART_TO_BUMP" # PART_TO_BUMP comes from the Github action (patch,major,minor)

NEW_VERSION=$(grep -w VERSION gradle.properties | cut -d"=" -f2)
if [ "$REPO" == "airbyte" ]; then
NEW_VERSION=$(grep -w VERSION run-ab-platform.sh | cut -d"=" -f2)
echo "Bumping version for Airbyte"
else
NEW_VERSION=$(grep -w VERSION .env | cut -d"=" -f2)
echo "Bumping version for Airbyte Platform"
fi

export VERSION=$NEW_VERSION # for safety, since lib.sh exports a VERSION that is now outdated

set +o xtrace
Expand Down

0 comments on commit b32357c

Please sign in to comment.