2020-06-11 10:50:32 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
source ci/_
|
|
|
|
|
2020-06-14 02:15:46 -07:00
|
|
|
(
|
2020-06-14 05:24:10 -07:00
|
|
|
echo --- git diff --check
|
2020-06-14 02:15:46 -07:00
|
|
|
set -x
|
2020-11-09 15:03:44 -08:00
|
|
|
|
|
|
|
if [[ -n $CI_BASE_BRANCH ]]
|
|
|
|
then branch="$CI_BASE_BRANCH"
|
|
|
|
else branch="master"
|
|
|
|
fi
|
|
|
|
|
2020-06-14 02:15:46 -07:00
|
|
|
# Look for failed mergify.io backports by searching leftover conflict markers
|
|
|
|
# Also check for any trailing whitespaces!
|
2020-11-09 15:03:44 -08:00
|
|
|
git fetch origin "$branch"
|
|
|
|
git diff "$(git merge-base HEAD "origin/$branch")" --check --oneline
|
2020-06-14 02:15:46 -07:00
|
|
|
)
|
2020-06-11 10:50:32 -07:00
|
|
|
|
2020-06-14 05:16:19 -07:00
|
|
|
echo
|
|
|
|
|
2020-06-11 10:50:32 -07:00
|
|
|
_ ci/nits.sh
|
|
|
|
_ ci/check-ssh-keys.sh
|
|
|
|
|
2021-03-29 22:44:51 -07:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2020-06-11 10:50:32 -07:00
|
|
|
echo --- ok
|