mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-03 01:23:53 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			665 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			665 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env sh
 | 
						|
set -eu
 | 
						|
 | 
						|
case ${1:-} in
 | 
						|
  '')
 | 
						|
    . $(dirname $0)/util
 | 
						|
    buildxCmd build \
 | 
						|
      --target validate \
 | 
						|
      --file ./hack/dockerfiles/docs.Dockerfile \
 | 
						|
      .
 | 
						|
    ;;
 | 
						|
  check)
 | 
						|
    status="$(git status --porcelain -- docs/reference 2>/dev/null)"
 | 
						|
    diffs=$(echo "$status" | grep -v '^[RAD] ' || true)
 | 
						|
    if [ "$diffs" ]; then
 | 
						|
      {
 | 
						|
        set +x
 | 
						|
        echo 'The result of ./hack/update-docs differs'
 | 
						|
        echo
 | 
						|
        echo "$diffs"
 | 
						|
        echo
 | 
						|
        echo 'Please vendor your package with ./hack/update-docs'
 | 
						|
        echo
 | 
						|
      } >&2
 | 
						|
      exit 1
 | 
						|
    fi
 | 
						|
    echo 'Congratulations! All docs changes are done the right way.'
 | 
						|
    ;;
 | 
						|
esac
 |