Skip to content

Commit 6af6bee

Browse files
author
Michael Collado
committed
fix new-version scripts for release
* to not overwrite TAG in docker-comose command in up.sh * to update python client version to new release Signed-off-by: Michael Collado <[email protected]>
1 parent bf0ecf8 commit 6af6bee

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

new-version.sh

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,6 @@ if [[ -n "$(git status --porcelain --untracked-files=no)" ]] ; then
118118
exit 1;
119119
fi
120120

121-
# Append '-SNAPSHOT' to 'NEXT_VERSION' if a release candidate, or missing
122-
# (ex: '-SNAPSHOT' will be appended to X.Y.Z or X.Y.Z-rc.N)
123-
if [[ "${NEXT_VERSION}" == *-rc.? ||
124-
! "${NEXT_VERSION}" == *-SNAPSHOT ]]; then
125-
NEXT_VERSION="${NEXT_VERSION}-SNAPSHOT"
126-
fi
127-
128121
# Ensure valid versions
129122
VERSIONS=($RELEASE_VERSION $NEXT_VERSION)
130123
for VERSION in "${VERSIONS[@]}"; do
@@ -155,8 +148,8 @@ sed -i "" "s/^version:.*/version: ${RELEASE_VERSION}/g" ./chart/Chart.yaml
155148
sed -i "" "s/tag:.*/tag: ${RELEASE_VERSION}/g" ./chart/values.yaml
156149

157150
# (4) Bump version in scripts
158-
sed -i "" "s/TAG=.*/TAG=${RELEASE_VERSION}/g" ./docker/up.sh
159-
sed -i "" "s/TAG=.*/TAG=${RELEASE_VERSION}/g" .env.example
151+
sed -i "" "s/TAG=\d.*/TAG=${RELEASE_VERSION}/g" ./docker/up.sh
152+
sed -i "" "s/TAG=\d.*/TAG=${RELEASE_VERSION}/g" .env.example
160153

161154
# (5) Bump version in docs
162155
sed -i "" "s/^ version:.*/ version: ${RELEASE_VERSION}/g" ./spec/openapi.yml
@@ -173,7 +166,16 @@ git commit -sam "Prepare for release ${RELEASE_VERSION}" --no-verify
173166
git fetch --all --tags
174167
git tag -a "${RELEASE_VERSION}" -m "marquez ${RELEASE_VERSION}"
175168

176-
# (9) Prepare next development version
169+
# (9) Prepare next development version for python and java modules
170+
for PYTHON_MODULE in "${PYTHON_MODULES[@]}"; do
171+
(cd "${PYTHON_MODULE}" && bump2version manual --new-version "${NEXT_VERSION}" --allow-dirty)
172+
done
173+
# For Java modules, append '-SNAPSHOT' to 'NEXT_VERSION' if a release candidate, or missing
174+
# (ex: '-SNAPSHOT' will be appended to X.Y.Z or X.Y.Z-rc.N)
175+
if [[ "${NEXT_VERSION}" == *-rc.? ||
176+
! "${NEXT_VERSION}" == *-SNAPSHOT ]]; then
177+
NEXT_VERSION="${NEXT_VERSION}-SNAPSHOT"
178+
fi
177179
sed -i "" "s/version=.*/version=${NEXT_VERSION}/g" gradle.properties
178180
sed -i "" "s/^ version:.*/ version: ${NEXT_VERSION}/g" ./spec/openapi.yml
179181

0 commit comments

Comments
 (0)