From 56d0908db2919fc9734a7722ece4adaa9d7b9bdc Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Mon, 14 Dec 2015 16:28:13 -0800 Subject: 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 --- scripts/code_manager_config_version.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/code_manager_config_version.rb (limited to 'scripts/code_manager_config_version.rb') 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'] -- cgit v1.2.3