| # Copyright 2023 The Go Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style | |
| # license that can be found in the LICENSE file. | |
| MUTABLE_VERSION ?= latest | |
| VERSION ?= $(shell git rev-parse --short HEAD) | |
| GCP_PROJECT_PROD := symbolic-datum-552 | |
| IMAGE_PROD := gcr.io/$(GCP_PROJECT_PROD)/makemac | |
| docker-prod: | |
| docker build -f Dockerfile --force-rm --tag=$(IMAGE_PROD):$(VERSION) ../.. | |
| docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION) | |
| push-prod: | |
| gcloud builds submit --project=$(GCP_PROJECT_PROD) --config=../../deploy/cloudbuild-from-local.yaml \ | |
| --substitutions="_SERVICE_NAME=makemac,TAG_NAME=$(VERSION)" ../.. | |
| deploy-prod: push-prod | |
| go install golang.org/x/build/cmd/xb | |
| xb --prod kubectl --namespace prod set image deployment/makemac-deployment makemac=$(IMAGE_PROD):$(VERSION) |