match/lib/match/encrypt.rb in fastlane-2.14.2 vs match/lib/match/encrypt.rb in fastlane-2.15.0.beta.20170213032052
- old
+ new
@@ -41,11 +41,11 @@
def encrypt_repo(path: nil, git_url: nil)
iterate(path) do |current|
crypt(path: current,
password: password(git_url),
encrypt: true)
- UI.success "🔒 Encrypted '#{File.basename(current)}'" if $verbose
+ UI.success "🔒 Encrypted '#{File.basename(current)}'" if FastlaneCore::Globals.verbose?
end
UI.success "🔒 Successfully encrypted certificates repo"
end
def decrypt_repo(path: nil, git_url: nil, manual_password: nil)
@@ -59,11 +59,11 @@
UI.user_error!("Invalid password passed via 'MATCH_PASSWORD'") if ENV["MATCH_PASSWORD"]
clear_password(git_url)
decrypt_repo(path: path, git_url: git_url)
return
end
- UI.success "🔓 Decrypted '#{File.basename(current)}'" if $verbose
+ UI.success "🔓 Decrypted '#{File.basename(current)}'" if FastlaneCore::Globals.verbose?
end
UI.success "🔓 Successfully decrypted certificates repo"
end
private
@@ -85,10 +85,10 @@
command << "-k #{password.shellescape}"
command << "-in #{path.shellescape}"
command << "-out #{tmpfile.shellescape}"
command << "-a"
command << "-d" unless encrypt
- command << "&> /dev/null" unless $verbose # to show show an error message is something goes wrong
+ command << "&> /dev/null" unless FastlaneCore::Globals.verbose? # to show show an error message is something goes wrong
success = system(command.join(' '))
UI.crash!("Error decrypting '#{path}'") unless success
FileUtils.mv(tmpfile, path)
end