Class: ObsDeploy::CLI::Commands::GetDeployedVersion

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/obs_deploy/cli/commands/get_deployed_version.rb

Instance Method Summary collapse

Instance Method Details

#call(url:, ignore_certificate:) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/obs_deploy/cli/commands/get_deployed_version.rb', line 11

def call(url:, ignore_certificate:, **)
  if ignore_certificate
    OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
    OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
  end

  puts "Deployed version: #{ObsDeploy::CheckDiff.new(server: url).obs_running_commit}"
end