Hello all,
This is a quickie…I wrote a small guard:
not_if “[ -f #{Chef::Config[:file_cache_path]}/#{node[:deploy_war]}.war ] && diff -q #{Chef::Config[:file_cache_path]}/#{node[:deploy_war]}.war #{node[:deployed_war_file]}”
—> what would be the most portable and common way of handling that diff?
Is there s Chef diff call to use? Or a proper checksum that I should call to compare?
I thought that I found it in this, from the net:
require 'chef/checksum_cache’
sha256 = Chef::ChecksumCache.checksum_for_file("/path/to/file")
but that call threw an error…we are on 12.0.3…too old?
Well, this is an openin to a convo more than a good question. All comments appreciated.
Christopher