Skip to content
Snippets Groups Projects
Commit 76a16029 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add validate-json tox target"

parents 01f53ef0 ac0b2a79
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set -e
TMPFILE=$(mktemp)
ret=0
function clean {
rm -f ${TMPFILE}
}
trap clean EXIT
for f in $(find docker/ -type f -name '*.json');do
jsonlint -s ${f} >${TMPFILE}
egrep -q 'has errors$' ${TMPFILE} && { cat ${TMPFILE}; ret=1 ;}
done
cat ${TMPFILE}
exit ${ret}
tox.ini 0 → 100644
[tox]
skipsdist = True
envlist = validate-json
minversion = 1.6
[testenv]
deps = -r{toxinidir}/test-requirements.txt
[testenv:validate-json]
commands =
{toxinidir}/tools/validate-json.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment