From 97e8dc5e2037d0d4715c7c2c7fdcceb9aef39faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Wed, 1 Jul 2015 17:48:34 +0900 Subject: [PATCH] Add validation script for min env vars documentation Change-Id: I46ffa01d0097916055857c3f968e716e0229795f Partially-implements: blueprint add-min-env-vars-gate --- tools/validate-min-env-vars.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/validate-min-env-vars.sh diff --git a/tools/validate-min-env-vars.sh b/tools/validate-min-env-vars.sh new file mode 100755 index 0000000000..bf76232f9e --- /dev/null +++ b/tools/validate-min-env-vars.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") +cd "$(dirname "$REAL_PATH")/.." + +MIN_ENV_VARS_DOC=./docs/minimal-environment-vars.md + +mv ${MIN_ENV_VARS_DOC}{,.validate} + +# Generate a new file and check the content is the same +./tools/min-env.sh +/usr/bin/diff ${MIN_ENV_VARS_DOC}{,.validate} +RET=$? + +mv ${MIN_ENV_VARS_DOC}{.validate,} + +exit $RET