Update CI error message when the version number needs to be bumped (#27997)
* Update CI error message when the version number needs to be bumped * Move channel version check to its own file and put it before nits
This commit is contained in:
parent
2f24a357b6
commit
0a97a5a006
|
@ -0,0 +1,27 @@
|
|||
# Ensure the current channel version is not equal ("greater") than
|
||||
# the version of the latest tag
|
||||
if [[ -z $CI_TAG ]]; then
|
||||
echo "--- channel version check"
|
||||
(
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
if [[ -n $CHANNEL_LATEST_TAG ]]; then
|
||||
source scripts/read-cargo-variable.sh
|
||||
|
||||
version=$(readCargoVariable version "version/Cargo.toml")
|
||||
echo "latest channel tag: $CHANNEL_LATEST_TAG"
|
||||
echo "current version: v$version"
|
||||
|
||||
if [[ $CHANNEL_LATEST_TAG = v$version ]]; then
|
||||
echo -e "\033[31mError:\033[0m A release has been tagged since your feature branch was last rebased. <current version> must be greater than <latest channel tag>..
|
||||
Possible solutions (in the order they should be tried):
|
||||
1. rebase your feature branch on the base branch
|
||||
2. merge the PR: \"Bump Version to ...\" once it has passed ci/checks, then rebase
|
||||
3. ask for help in #devops on discord"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Skipped. CHANNEL_LATEST_TAG (CHANNEL=$CHANNEL) unset"
|
||||
fi
|
||||
)
|
||||
fi
|
|
@ -22,32 +22,8 @@ source ci/_
|
|||
|
||||
echo
|
||||
|
||||
_ ci/check-channel-version.sh
|
||||
_ ci/nits.sh
|
||||
_ ci/check-ssh-keys.sh
|
||||
|
||||
|
||||
# Ensure the current channel version is not equal ("greater") than
|
||||
# the version of the latest tag
|
||||
if [[ -z $CI_TAG ]]; then
|
||||
echo "--- channel version check"
|
||||
(
|
||||
eval "$(ci/channel-info.sh)"
|
||||
|
||||
if [[ -n $CHANNEL_LATEST_TAG ]]; then
|
||||
source scripts/read-cargo-variable.sh
|
||||
|
||||
version=$(readCargoVariable version "version/Cargo.toml")
|
||||
echo "version: v$version"
|
||||
echo "latest channel tag: $CHANNEL_LATEST_TAG"
|
||||
|
||||
if [[ $CHANNEL_LATEST_TAG = v$version ]]; then
|
||||
echo "Error: please run ./scripts/increment-cargo-version.sh"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Skipped. CHANNEL_LATEST_TAG (CHANNEL=$CHANNEL) unset"
|
||||
fi
|
||||
)
|
||||
fi
|
||||
|
||||
echo --- ok
|
||||
|
|
Loading…
Reference in New Issue