From 9ea8045b952203b4db853b50b8a4cb2315576013 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 23 Jun 2023 14:47:15 -0700 Subject: [PATCH] Update release notes and add 'make release' --- Makefile | 9 +++++++++ RELEASING.md | 18 ++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 38cca74fe..a5c4ba699 100644 --- a/Makefile +++ b/Makefile @@ -222,6 +222,15 @@ manifest-list: all-push --template $(REGISTRY)/$(BIN):$(VERSION)__OS_ARCH \ --target $(REGISTRY)/$(BIN):$(VERSION) +release: + if [ -z "$(TAG)" ]; then \ + echo "ERROR: TAG must be set"; \ + false; \ + fi + docker pull "$(BUILD_IMAGE)" + git tag -am "$(TAG)" "$(TAG)" + make manifest-list + version: echo $(VERSION) diff --git a/RELEASING.md b/RELEASING.md index 9502fe2d5..68e5fb069 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,36 +2,34 @@ ## Tags -First, see what has been tagged: +First, pick the new tag. Usually this means to see what has already been +tagged, and pick the next release number. ``` git tag ``` -Pick the next release number and tag it. +## Log in + +Make sure you are logged into Google Cloud (to push to GCR). ``` -git tag -am v3.3.2 v3.3.2 +gcloud auth login ``` ## Build and push to staging To build git-sync you need [docker buildx](https://github.com/docker/buildx). -Make sure you are logged into Google Cloud (to push to GCR). - -``` -gcloud auth login -``` - The following step will build for all platforms and push the container images to our staging repo (gcr.io/k8s-staging-git-sync). ``` -make manifest-list +make release TAG="" ``` This will produce output like: + ``` <...lots of output...> Successfully tagged gcr.io/k8s-staging-git-sync/git-sync:v3.3.2__linux_amd64