agones.dev/agones@v1.54.0/test/sdk/go/Makefile (about) 1 # Copyright 2024 Google LLC All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 # 16 # Makefile for building a test game-server 17 # 18 19 # __ __ _ _ _ 20 # \ \ / /_ _ _ __(_) __ _| |__ | | ___ ___ 21 # \ \ / / _` | '__| |/ _` | '_ \| |/ _ \ __| 22 # \ V / (_| | | | | (_| | |_) | | __\__ \ 23 # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ 24 # 25 26 REGISTRY ?= 27 mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) 28 project_path := $(dir $(mkfile_path)) 29 root_path = $(realpath $(project_path)/) 30 # Because go mod init in the Dockerfile installs the most recently released version of Agones, this 31 # will need to be built and pushed post-release. During DEV it will be built at DEV - 1. 32 release_version = 1.53.0 33 server_tag := $(REGISTRY)/sdk-client-test:$(release_version) 34 35 # _____ _ 36 # |_ _|_ _ _ __ __ _ ___| |_ ___ 37 # | |/ _` | '__/ _` |/ _ \ __/ __| 38 # | | (_| | | | (_| | __/ |_\__ \ 39 # |_|\__,_|_| \__, |\___|\__|___/ 40 # |___/ 41 42 # Build a docker image for the server, and tag it 43 build: 44 cd $(root_path) && docker build -f $(project_path)Dockerfile --tag=$(server_tag) . 45 46 push: build 47 docker push $(server_tag) 48 49 # build and push the sdk-client-test image with specified tag 50 cloud-build: 51 cd $(root_path) && gcloud builds submit --config=cloudbuild.yaml