mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
* feat: update golang to 1.19 Signed-off-by: Bradley Jones <bradley.jones@anchore.com> * chore: break out json schema drift check into separate script Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * chore: update git index refresh Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> --------- Signed-off-by: Bradley Jones <bradley.jones@anchore.com> Signed-off-by: Alex Goodman <alex.goodman@anchore.com> Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
28 lines
503 B
Bash
Executable File
28 lines
503 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -u
|
|
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git diff-index HEAD --
|
|
git --no-pager diff
|
|
echo "there are uncommitted changes, please commit them before running this check"
|
|
exit 1
|
|
fi
|
|
|
|
success=true
|
|
|
|
if ! make generate-json-schema; then
|
|
echo "Generating json schema failed"
|
|
success=false
|
|
fi
|
|
|
|
if ! git diff-index --quiet HEAD --; then
|
|
git diff-index HEAD --
|
|
git --no-pager diff
|
|
echo "JSON schema drift detected!"
|
|
success=false
|
|
fi
|
|
|
|
if ! $success; then
|
|
exit 1
|
|
fi
|