Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: check that the new version is not empty #2331

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ function main() {
local vVersion="v${version}"
echo "Current version: ${vVersion}"

# Get the version to bump to from the semver-tool and the bump type
local newVersion=$(docker run --rm --platform=linux/amd64 -i "${DOCKER_IMAGE_SEMVER}" bump "${BUMP_TYPE}" "${vVersion}")
if [[ "${newVersion}" == "" ]]; then
echo "Failed to bump the version. Please check the semver-tool image and the bump type."
exit 1
fi

# Commit the project in the current state
gitCommitVersion "${vVersion}"

Expand All @@ -45,8 +52,6 @@ function main() {
done
done

# Get the version to bump to from the semver-tool and the bump type
local newVersion=$(docker run --rm --platform=linux/amd64 -i "${DOCKER_IMAGE_SEMVER}" bump "${BUMP_TYPE}" "${vVersion}")
echo "Producing a ${BUMP_TYPE} bump of the version, from ${version} to ${newVersion}"

# Bump the version in the version.go file
Expand Down
Loading