Add config up-to-date check script

Add a script that will determine if the sample config file is up to date
with the latest code in the source tree.  Running this automatically in
the gate will prevent patches from going in that didn't update the
sample config when they should have.

Change-Id: I3cdc3480a0947d78165172c1a720e7ef9c1fb144
This commit is contained in:
Russell Bryant 2013-11-18 16:10:48 -05:00
parent efd14a57f0
commit 9b6bc27939

22
tools/config/check_uptodate.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
TEMPDIR=`mktemp -d`
CFGFILE=solum.conf.sample
tools/config/generate_sample.sh -b ./ -p solum -o $TEMPDIR
if ! diff $TEMPDIR/$CFGFILE etc/solum/$CFGFILE
then
echo "E: solum.conf.sample is not up to date, please run tools/config/generate_sample.sh"
exit 42
fi