diff options
| author | Martin André <martin.andre@kvhasia.com> | 2015-01-15 10:09:30 +0900 |
|---|---|---|
| committer | Martin André <martin.andre@kvhasia.com> | 2015-01-19 10:32:49 +0900 |
| commit | 13799455c20074cad967a0b6fbe50b883163b4fd (patch) | |
| tree | 05fe7215856bca62563d2ecfe84ac7978bc12d02 /tools/validate-all-yaml.sh | |
| parent | 9723a796d3ccdf3d898ae0612f48a4ec1fa91d4f (diff) | |
| download | kolla-ansible-13799455c20074cad967a0b6fbe50b883163b4fd.tar.gz kolla-ansible-13799455c20074cad967a0b6fbe50b883163b4fd.zip | |
Make scripts work on latest Atomic images
Remove git and jq dependency in most scripts, allowing to run them on
latest atomic images, or even distribute Kolla in the form of tarball.
The only remainings of git dependency are in the git pre-commit hook,
and in the image build scripts. We can remove the latter one and have
the scripts running in degraded mode if we really want to.
I opted for a python based approach to finding the top-level directory
for portability, ensuring consistent result on Linux and BSD, including
OSX.
Change-Id: I987174032d11b2e9d6a993c563b5dc877c15dd2d
Diffstat (limited to 'tools/validate-all-yaml.sh')
| -rwxr-xr-x | tools/validate-all-yaml.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/validate-all-yaml.sh b/tools/validate-all-yaml.sh index 6a16d9a98..b19cfe18a 100755 --- a/tools/validate-all-yaml.sh +++ b/tools/validate-all-yaml.sh @@ -1,9 +1,8 @@ #!/bin/sh -TOPLEVEL=$(git rev-parse --show-toplevel) +REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") +cd "$(dirname "$REAL_PATH")/.." -cd $TOPLEVEL - -git ls-files -z '*.yaml' | +find . -name '*.yaml' -print0 | xargs -0 python tools/validate-yaml.py || exit 1 |
