golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/js-wasm-node18/Makefile (about)

     1  # Copyright 2022 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  PROD_REPO=gcr.io/symbolic-datum-552
     7  
     8  usage:
     9  	echo "Use prod or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1
    10  
    11  prod: Dockerfile
    12  	sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
    13  	docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
    14  
    15  pushprod: prod
    16  	docker push $(PROD_REPO)/$(IMAGE_NAME):latest
    17  	rm Dockerfile.make
    18  
    19  # You must provide a REPO=your-repo-name arg when you make
    20  # this target. REPO is the name of the Docker repository
    21  # that will be prefixed to the name of the image being built.
    22  dev: Dockerfile
    23  	sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
    24  	docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
    25  	docker push $(REPO)/$(IMAGE_NAME):latest
    26  	rm Dockerfile.make