diff options
author | mail_redacted_for_web | 2015-12-14 16:28:13 -0800 |
---|---|---|
committer | mail_redacted_for_web | 2015-12-18 09:24:27 -0800 |
commit | 56d0908db2919fc9734a7722ece4adaa9d7b9bdc (patch) | |
tree | a5d0b989e2e7d288fda514eff793a9f760e2f146 /scripts/code_manager_config_version.rb | |
parent | b8d4980f86eecda72928de0e9f28c32e9078d117 (diff) | |
download | control-repo-template-56d0908db2919fc9734a7722ece4adaa9d7b9bdc.tar.bz2 |
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
Diffstat (limited to 'scripts/code_manager_config_version.rb')
-rw-r--r-- | scripts/code_manager_config_version.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/code_manager_config_version.rb b/scripts/code_manager_config_version.rb new file mode 100644 index 0000000..7ed5680 --- /dev/null +++ b/scripts/code_manager_config_version.rb @@ -0,0 +1,9 @@ +require 'json' + +environmentpath = ARGV[0] +environment = ARGV[1] + +r10k_deploy_file_path = File.join(environmentpath, environment, '.r10k-deploy.json') + +#output the sha1 from the control-repo +puts JSON.parse(File.read(r10k_deploy_file_path))['signature'] |