summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2021-01-08 18:01:05 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-08 18:03:17 -0800
commit0c99ab70905fa4eaf8bc7b0ca846e12d7bbc6e39 (patch)
tree426d2500979192e3d32778bdb492f54119303856 /Makefile
parent70de1db82e9d3b2c4491031f1f8a9c5a5830c7c0 (diff)
Support releasing aarch64 builds.
This change works around an issue in rules_pkg, described here: https://github.com/bazelbuild/rules_pkg/pull/263 PiperOrigin-RevId: 350869030
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile47
1 files changed, 25 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index 4eb85f5af..549093ffa 100644
--- a/Makefile
+++ b/Makefile
@@ -404,20 +404,22 @@ website-deploy: website-push ## Deploy a new version of the website.
## Repository builders.
##
## This builds a local apt repository. The following variables may be set:
-## RELEASE_ROOT - The repository root (default: "repo" directory).
-## RELEASE_KEY - The repository GPG private key file (default: dummy key is created).
-## RELEASE_NIGHTLY - Set to true if a nightly release (default: false).
-## RELEASE_COMMIT - The commit or Change-Id for the release (needed for tag).
-## RELEASE_NAME - The name of the release in the proper format (needed for tag).
-## RELEASE_NOTES - The file containing release notes (needed for tag).
+## RELEASE_ROOT - The repository root (default: "repo" directory).
+## RELEASE_KEY - The repository GPG private key file (default: dummy key is created).
+## RELEASE_ARTIFACTS - The release artifacts directory. May contain multiple.
+## RELEASE_NIGHTLY - Set to true if a nightly release (default: false).
+## RELEASE_COMMIT - The commit or Change-Id for the release (needed for tag).
+## RELEASE_NAME - The name of the release in the proper format (needed for tag).
+## RELEASE_NOTES - The file containing release notes (needed for tag).
##
-RELEASE_ROOT := $(CURDIR)/repo
-RELEASE_KEY := repo.key
-RELEASE_NIGHTLY := false
-RELEASE_COMMIT :=
-RELEASE_NAME :=
-RELEASE_NOTES :=
-GPG_TEST_OPTIONS := $(shell if gpg --pinentry-mode loopback --version >/dev/null 2>&1; then echo --pinentry-mode loopback; fi)
+RELEASE_ROOT := repo
+RELEASE_KEY := repo.key
+RELEASE_ARTIFACTS := artifacts
+RELEASE_NIGHTLY := false
+RELEASE_COMMIT :=
+RELEASE_NAME :=
+RELEASE_NOTES :=
+GPG_TEST_OPTIONS := $(shell if gpg --pinentry-mode loopback --version >/dev/null 2>&1; then echo --pinentry-mode loopback; fi)
$(RELEASE_KEY):
@echo "WARNING: Generating a key for testing ($@); don't use this."
@@ -433,15 +435,16 @@ $(RELEASE_KEY):
gpg --batch $(GPG_TEST_OPTIONS) --export-secret-keys --no-default-keyring --secret-keyring $$T > $@; \
rc=$$?; rm -f $$T $$C; exit $$rc
-release: $(RELEASE_KEY) ## Builds a release.
- @mkdir -p $(RELEASE_ROOT)
- @export T=$$(mktemp -d --tmpdir release.XXXXXX); \
- $(call copy,//runsc:runsc,$$T) && \
- $(call copy,//shim/v1:gvisor-containerd-shim,$$T) && \
- $(call copy,//shim/v2:containerd-shim-runsc-v1,$$T) && \
- $(call copy,//debian:debian,$$T) && \
- NIGHTLY=$(RELEASE_NIGHTLY) tools/make_release.sh $(RELEASE_KEY) $(RELEASE_ROOT) $$T/*; \
- rc=$$?; rm -rf $$T; exit $$rc
+$(RELEASE_ARTIFACTS)/%:
+ @mkdir -p $@
+ @$(call copy,//runsc:runsc,$@)
+ @$(call copy,//shim/v1:gvisor-containerd-shim,$@)
+ @$(call copy,//shim/v2:containerd-shim-runsc-v1,$@)
+ @$(call copy,//debian:debian,$@)
+
+release: $(RELEASE_KEY) $(RELEASE_ARTIFACTS)/$(ARCH)
+ @rm -rf $(RELEASE_ROOT) && mkdir -p $(RELEASE_ROOT)
+ @NIGHTLY=$(RELEASE_NIGHTLY) tools/make_release.sh $(RELEASE_KEY) $(RELEASE_ROOT) $$(find $(RELEASE_ARTIFACTS) -type f)
.PHONY: release
tag: ## Creates and pushes a release tag.