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.
		
		
		
		
		
			
		
			
				
	
	
		
			30 lines
		
	
	
		
			668 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			30 lines
		
	
	
		
			668 B
		
	
	
	
		
			Bash
		
	
| #!/usr/bin/env sh
 | |
| set -eu
 | |
| 
 | |
| case ${1:-} in
 | |
|   '')
 | |
|     . $(dirname $0)/util
 | |
|     buildxCmd build \
 | |
|       --target validate \
 | |
|       --file ./hack/dockerfiles/vendor.Dockerfile \
 | |
|       .
 | |
|     ;;
 | |
|   check)
 | |
|     status="$(git status --porcelain -- go.mod go.sum vendor 2>/dev/null)"
 | |
|     diffs=$(echo "$status" | grep -v '^[RAD] ' || true)
 | |
|     if [ "$diffs" ]; then
 | |
|       {
 | |
|         set +x
 | |
|         echo 'The result of "make vendor" differs'
 | |
|         echo
 | |
|         echo "$diffs"
 | |
|         echo
 | |
|         echo 'Please vendor your package with "make vendor"'
 | |
|         echo
 | |
|       } >&2
 | |
|       exit 1
 | |
|     fi
 | |
|     echo 'Congratulations! All vendoring changes are done the right way.'
 | |
|     ;;
 | |
| esac
 |