Skip to content

Commit c9478cc

Browse files
joshjmsProw
authored and
Prow
committed
fix: test-release checks
Address reviews in #19815 This is a cherrypick of c940bf5 PR: #19848 Signed-off-by: joshjms <[email protected]>
1 parent 1ee107e commit c9478cc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ test-e2e-release:
168168

169169
.PHONY: test-release
170170
test-release:
171-
PASSES="release_tests" VERSION="3.4.99" CI=$$CI ./scripts/test.sh $(GO_TEST_FLAGS)
171+
PASSES="release_tests" VERSION="3.4.99" ./test $(GO_TEST_FLAGS)
172172

173173
docker-test:
174174
$(info GO_VERSION: $(GO_VERSION))

test

+6-3
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,10 @@ function release_pass {
399399
}
400400

401401
function release_tests_pass {
402-
VERSION=$(go list -m go.etcd.io/etcd/api/v3 2>/dev/null | awk '{split(substr($2,2), a, "."); print a[1]"."a[2]".99"}')
402+
if [ -z "${VERSION:-}" ]; then
403+
VERSION=$(go list -m go.etcd.io/etcd/api/v3 2>/dev/null | \
404+
awk '{split(substr($2,2), a, "."); print a[1]"."a[2]".99"}')
405+
fi
403406

404407
if [ -n "${CI:-}" ]; then
405408
git config user.email "[email protected]"
@@ -419,8 +422,8 @@ EOF
419422
git remote add origin https://github.com/etcd-io/etcd.git
420423
fi
421424

422-
DRY_RUN=true run "./scripts/release.sh" --no-upload --no-docker-push --no-gh-release --in-place "${VERSION}"
423-
VERSION="${VERSION}" run "./scripts/test_images.sh"
425+
DRY_RUN=true "./scripts/release.sh" --no-upload --no-docker-push --no-gh-release --in-place "${VERSION}"
426+
VERSION="${VERSION}" "./scripts/test_images.sh"
424427
}
425428

426429
function shellcheck_pass {

0 commit comments

Comments
 (0)