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 | 20 +++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 38cca74..a5c4ba6 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 9502fe2..68e5fb0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,21 +2,14 @@ ## 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. - -``` -git tag -am v3.3.2 v3.3.2 -``` - -## Build and push to staging - -To build git-sync you need [docker buildx](https://github.com/docker/buildx). +## Log in Make sure you are logged into Google Cloud (to push to GCR). @@ -24,14 +17,19 @@ Make sure you are logged into Google Cloud (to push to GCR). gcloud auth login ``` +## Build and push to staging + +To build git-sync you need [docker buildx](https://github.com/docker/buildx). + 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