golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/js-wasm/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  STAGING_REPO=gcr.io/go-dashboard-dev
     7  PROD_REPO=gcr.io/symbolic-datum-552
     8  
     9  usage:
    10  	echo "Use staging, prod, or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1
    11  
    12  staging: Dockerfile
    13  	sed 's|{{REPO}}|'"$(STAGING_REPO)"'|g' Dockerfile > Dockerfile.make
    14  	docker build -t $(STAGING_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
    15  
    16  pushstaging: staging
    17  	docker push $(STAGING_REPO)/$(IMAGE_NAME):latest
    18  	rm Dockerfile.make
    19  
    20  prod: Dockerfile
    21  	sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
    22  	docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
    23  
    24  pushprod: prod
    25  	docker push $(PROD_REPO)/$(IMAGE_NAME):latest
    26  	rm Dockerfile.make
    27  
    28  # You must provide a REPO=your-repo-name arg when you make
    29  # this target. REPO is the name of the Docker repository
    30  # that will be prefixed to the name of the image being built.
    31  dev: Dockerfile
    32  	sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
    33  	docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
    34  	docker push $(REPO)/$(IMAGE_NAME):latest
    35  	rm Dockerfile.make