control-repo/scripts/code_manager_config_version.rb

10 lines
257 B
Ruby
Raw Normal View History

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']