control-repo/scripts/config_version.sh
Nick Walker 56d0908db2 Update config_version to read r10k_deploy.json file
Update config_version.sh to read the r10k_deploy.json file if it
exists.  If it does not exist it will fall back to the existing
logic
2015-12-18 09:24:27 -08:00

13 lines
381 B
Bash
Executable File

#!/bin/bash
if [ -e $1/$2/.r10k-deploy.json ]
then
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/code_manager_config_version.rb $1 $2
elif [ -e /opt/puppetlabs/server/pe_version ]
then
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/config_version.rb $1 $2
else
/usr/bin/git --version > /dev/null 2>&1 &&
/usr/bin/git --git-dir $1/$2/.git rev-parse HEAD ||
date +%s
fi