Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Revert "Always pass upgrade test (#2059)" #2061

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions test/e2e-upgrade-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

# Script entry point.

exit 0

export GO111MODULE=on

# shellcheck disable=SC1090
Expand Down
13 changes: 13 additions & 0 deletions test/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ function cloud_run_events_setup() {
wait_until_pods_running events-system || return 1
}

function latest_version() {
if [ $(current_branch) = "master" ]; then
# For master, simply use git tag without major version, this will work even if the release tag is not in the master
git tag | sort -r --version-sort | head -n1
else
local semver=$(git describe --match "v[0-9]*" --abbrev=0)
local major_minor=$(echo "$semver" | cut -d. -f1-2)

# Get the latest patch release for the major minor
git tag -l "${major_minor}*" | sort -r --version-sort | head -n1
fi
}

# Latest release. If user does not supply this as a flag, the latest
# tagged release on the current branch will be used.
readonly LATEST_RELEASE_VERSION=$(latest_version)
Expand Down