Skip to content

Commit

Permalink
Merge pull request #26 from sharifelgamal/v0.0.9
Browse files Browse the repository at this point in the history
Update Makefile for v0.0.9
  • Loading branch information
sharifelgamal committed Jun 21, 2022
2 parents 3f63118 + 8f592a4 commit f60e0ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
REGISTRY?=gcr.io/k8s-minikube
VERSION=v0.0.8
VERSION=v0.0.9
GOOS?=$(shell go env GOOS)
GOARCH?=$(shell go env GOARCH)
KO_VERSION=0.11.2

build: ## Build the gcp-auth-webhook binary
CGO_ENABLED=0 GOOS=linux go build -o out/gcp-auth-webhook server.go

.PHONY: image
image: ## Create and push multiarch manifest and images
@read -p "This will build and push $(REGISTRY)/gcp-auth-webhook:$(VERSION). Do you want to proceed? (Y/N): " confirm && echo $$confirm | grep -iq "^[yY]" || exit 1;
curl -L https://github.com/google/ko/releases/download/v0.10.0/ko_0.10.0_$(GOOS)_x86_64.tar.gz | tar xzf - ko && chmod +x ./ko
curl -L https://github.com/google/ko/releases/download/v$(KO_VERSION)/ko_$(KO_VERSION)_$(GOOS)_$(GOARCH).tar.gz | tar xzf - ko && chmod +x ./ko
KO_DOCKER_REPO=$(REGISTRY) ./ko publish -B . --platform all -t $(VERSION)
rm ./ko

Expand Down
4 changes: 4 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Releasing a new gcp-auth-webhook image
Bump the `VERSION` variable in the Makefile and open a PR to update it. Make sure `KO_VERSION` is the latest version according to its [github repo](https://github.com/google/ko/releases).

Once merged, create a tag with the same name as the new version, then create a release in the github UI. Once the release is created, run `make image`. This will use `ko` to create the new multiarch image and push it to `$REGISTRY/gcp-auth-webhook` according to the REGISTRY variable in the Makefile.

0 comments on commit f60e0ce

Please sign in to comment.