golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/shared-makefile/Makefile (about) 1 # Copyright 2018 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 IMAGE_NAME=$(shell basename $(CURDIR)) 6 7 usage: 8 echo "see Makefile for usage for building $(IMAGE_NAME)" 9 10 docker: Dockerfile 11 go install golang.org/x/build/cmd/xb 12 xb docker build -t golang/$(IMAGE_NAME) . 13 14 testssh: docker 15 go install golang.org/x/build/cmd/buildlet/testssh 16 testssh --start-image=golang/$(IMAGE_NAME) 17 18 push-staging: docker 19 go install golang.org/x/build/cmd/xb 20 xb --staging docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):latest 21 xb --staging docker push REPO/$(IMAGE_NAME):latest 22 23 push-prod: docker 24 go install golang.org/x/build/cmd/xb 25 xb --prod docker tag golang/$(IMAGE_NAME) REPO/$(IMAGE_NAME):latest 26 xb --prod docker push REPO/$(IMAGE_NAME):latest