golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cmd/gomoteserver/Makefile (about)

     1  # Copyright 2023 The Go Authors. All rights reserved.
     2  # Use of this source code is governed by a BSD-style
     3  # license that can be found in the LICENSE file.
     4  
     5  usage: FORCE
     6  	exit 1
     7  
     8  FORCE:
     9  
    10  MUTABLE_VERSION := latest
    11  # TODO(go.dev/issue/62118) change how version is generated.
    12  VERSION := $(shell ./version.sh)
    13  
    14  GCP_PROJECT_PROD := symbolic-datum-552
    15  IMAGE_PROD := gcr.io/$(GCP_PROJECT_PROD)/gomoteserver
    16  
    17  DOCKER_IMAGE=golang/gomoteserver
    18  
    19  docker: *.go Dockerfile
    20  	docker build --force-rm -f Dockerfile --build-arg "version=$(VERSION)" --tag=$(DOCKER_IMAGE):$(VERSION) ../..
    21  
    22  push-prod:
    23  	gcloud builds submit --project $(GCP_PROJECT_PROD) --config ./cloudbuild.yaml --substitutions=TAG_NAME="$(VERSION)" ../../
    24  
    25  deploy-prod: push-prod
    26  	go install golang.org/x/build/cmd/xb
    27  	xb --prod kubectl --namespace prod set image deployment/gomoteserver-deployment gomoteserver=$(IMAGE_PROD):$(VERSION)