github.com/anchore/syft@v1.38.2/.github/scripts/json-schema-drift-check.sh (about)

     1  #!/usr/bin/env bash
     2  set -u
     3  
     4  if [ "$(git status --porcelain | wc -l)" -ne "0" ]; then
     5    echo "  🔴 there are uncommitted changes, please commit them before running this check"
     6    exit 1
     7  fi
     8  
     9  if ! make generate-json-schema; then
    10    echo "Generating json schema failed"
    11    exit 1
    12  fi
    13  
    14  if [ "$(git status --porcelain | wc -l)" -ne "0" ]; then
    15    echo "  🔴 there are uncommitted changes, please commit them before running this check"
    16    exit 1
    17  fi