2015-08-25 18:47:19 +00:00
|
|
|
#!/bin/bash
|
2015-12-15 00:28:13 +00:00
|
|
|
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 ]
|
2017-07-05 23:55:39 +00:00
|
|
|
then
|
|
|
|
/opt/puppetlabs/puppet/bin/ruby $1/$2/scripts/config_version.rb $1 $2
|
2015-08-25 18:47:19 +00:00
|
|
|
else
|
2015-11-20 13:29:17 +00:00
|
|
|
/usr/bin/git --version > /dev/null 2>&1 &&
|
|
|
|
/usr/bin/git --git-dir $1/$2/.git rev-parse HEAD ||
|
|
|
|
date +%s
|
2017-07-05 23:55:39 +00:00
|
|
|
fi
|