Skip to content

Commit

Permalink
Fix release issues
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydavenport committed Sep 21, 2018
1 parent e5c1ed7 commit dd5d24e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ comma := ,
prefix_linux = $(addprefix linux/,$(strip $1))
join_platforms = $(subst $(space),$(comma),$(call prefix_linux,$(strip $1)))


# list of arches *not* to build when doing *-all
# until s390x works correctly
EXCLUDEARCH ?= s390x
Expand Down Expand Up @@ -240,7 +239,6 @@ else
$(NOECHO) $(NOOP)
endif


## tag images of one arch
tag-images: imagetag $(addprefix sub-single-tag-images-arch-,$(call escapefs,$(PUSH_IMAGES))) $(addprefix sub-single-tag-images-non-manifest-,$(call escapefs,$(PUSH_NONMANIFEST_IMAGES)))
sub-single-tag-images-arch-%:
Expand All @@ -254,14 +252,11 @@ else
$(NOECHO) $(NOOP)
endif



## tag images of all archs
tag-images-all: imagetag $(addprefix sub-tag-images-,$(VALIDARCHES))
sub-tag-images-%:
$(MAKE) tag-images ARCH=$* IMAGETAG=$(IMAGETAG)


###############################################################################
# Static checks
###############################################################################
Expand Down Expand Up @@ -376,8 +371,8 @@ endif
## Verifies the release artifacts produces by `make release-build` are correct.
release-verify: release-prereqs
# Check the reported version is correct for each release artifact.
if ! docker run $(BUILD_IMAGE):$(VERSION) -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run $(BUILD_IMAGE):$(VERSION) -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi
if ! docker run quay.io/$(BUILD_IMAGE):$(VERSION) -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run quay.io/$(BUILD_IMAGE):$(VERSION) -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi
if ! docker run $(BUILD_IMAGE):$(VERSION)-$(ARCH) -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run $(BUILD_IMAGE):$(VERSION)-$(ARCH) -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi
if ! docker run quay.io/$(BUILD_IMAGE):$(VERSION)-$(ARCH) -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run quay.io/$(BUILD_IMAGE):$(VERSION)-$(ARCH) -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi

## Generates release notes based on commits in this version.
release-notes: release-prereqs
Expand All @@ -391,7 +386,7 @@ release-publish: release-prereqs
git push origin $(VERSION)

# Push images.
$(MAKE) push-all IMAGETAG=$(VERSION)
$(MAKE) push-all push-manifests push-non-manifests IMAGETAG=$(VERSION)

@echo "Finalize the GitHub release based on the pushed tag."
@echo ""
Expand All @@ -410,15 +405,14 @@ release-publish-latest: release-prereqs
if ! docker run $(BUILD_IMAGE):latest -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run $(BUILD_IMAGE):latest -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi
if ! docker run quay.io/$(BUILD_IMAGE):latest -v | grep '^$(VERSION)$$'; then echo "Reported version:" `docker run quay.io/$(BUILD_IMAGE):latest -v` "\nExpected version: $(VERSION)"; false; else echo "\nVersion check passed\n"; fi

$(MAKE) push-all IMAGETAG=latest
$(MAKE) push-all push-manifests push-non-manifests IMAGETAG=latest

# release-prereqs checks that the environment is configured properly to create a release.
release-prereqs:
ifndef VERSION
$(error VERSION is undefined - run using make release VERSION=vX.Y.Z)
endif


###############################################################################
# Developer helper scripts (not used by build or test)
###############################################################################
Expand Down

0 comments on commit dd5d24e

Please sign in to comment.