You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			547 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			32 lines
		
	
	
		
			547 B
		
	
	
	
		
			Bash
		
	
| #!/usr/bin/env bash
 | |
| 
 | |
| TAG=$1
 | |
| OUT=$2
 | |
| 
 | |
| set -eu -o pipefail
 | |
| 
 | |
| : ${PLATFORMS=linux/amd64}
 | |
| : ${CONTINUOUS_INTEGRATION=}
 | |
| 
 | |
| progressFlag=""
 | |
| if [ "$CONTINUOUS_INTEGRATION" == "true" ]; then progressFlag="--progress=plain"; fi
 | |
| 
 | |
| 
 | |
| usage() {
 | |
|   echo "usage: ./hack/release <tag> <out>"
 | |
|   exit 1
 | |
| }
 | |
| 
 | |
| if [ -z "$TAG" ] || [ -z "$OUT" ]; then 
 | |
|   usage
 | |
| fi
 | |
| 
 | |
| 
 | |
| set -x
 | |
| 
 | |
| buildctl build $progressFlag --frontend=dockerfile.v0 \
 | |
|   --local context=. --local dockerfile=. \
 | |
|   --opt target=release \
 | |
|   --opt platform=$PLATFORMS \
 | |
|   --exporter local \
 | |
|   --exporter-opt output=$OUT |