Skip to content

Commit

Permalink
dont check update_downgrade workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Aug 20, 2024
1 parent 9438b2b commit 461d26c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/check_go_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ if [ -z "${GO_MOD_VERSION}" ]; then
exit 1
fi

# ci workflows
TPL_GO_VERSIONS="$(awk '/go-version: /{print $(NF-0)}' .github/workflows/*.yml test/templates/*.tpl | sort -u)"
# ci workflows excluding upgrade/downgrade tests
TPL_GO_VERSIONS="$(find .github/workflows test/templates -type f \( -name '*.yml' -o -name '*.tpl' \) \
! -name 'upgrade_downgrade_test*.yml' \
-exec awk '/go-version: /{print $(NF-0)}' {} + | sort -u)"
TPL_GO_VERSIONS_COUNT=$(echo "$TPL_GO_VERSIONS" | wc -l | tr -d [:space:])
if [ "${TPL_GO_VERSIONS_COUNT}" -gt 1 ]; then
echo -e "expected a consistent 'go-version:' in CI workflow files/templates, found versions:\n${TPL_GO_VERSIONS}"
Expand All @@ -35,4 +37,4 @@ if [[ ! "${BOOTSTRAP_GO_VERSION}" =~ "${GO_MOD_VERSION}" ]]; then
elif [ "${TPL_GO_VERSION}" != "${BOOTSTRAP_GO_VERSION}" ]; then
echo "expected equal go version in CI workflow files/templates and bootstrap Dockerfile: '${TPL_GO_VERSIONS}' != '${BOOTSTRAP_GO_VERSION}'"
exit 1
fi
fi

0 comments on commit 461d26c

Please sign in to comment.