itamae/tasks/encrypt.rake

14 lines
309 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
#!/usr/bin/env rake
desc 'Encrypt the file'
task :encrypt do
files = `find cookbooks -type f -name 'encrypt_*'`.split("\n")
files.each do |f|
from = f
to = f.sub('encrypt_', '')
sh "bundle ex reversible_cryptography encrypt --password=musashi --src-file=#{from} --dst-file=#{to}"
end
end