Sha256: 7d47fb386f650ac75de9ead40d0ed2c04d7f3f4c8582bac11413ecae22cdd994

Contents?: true

Size: 1000 Bytes

Versions: 11

Compression:

Stored size: 1000 Bytes

Contents

module Calabash
  # @!visibility private
  module CLI
    # @!visibility private
    module Resign
      # @!visibility private
      def parse_resign_arguments!
        fail('Can only resign Android applications') unless @platform.nil? || @platform == :android

        application = @arguments.shift

        if application.nil?
          fail('Must supply application as first parameter to resign', :resign)
        elsif !File.exists?(application)
          fail("File '#{application}' does not exist", :resign)
        else
          extension = File.extname(application)

          case extension
            when '.apk'
              set_platform!(:android)
              Calabash::Android::Build::Resigner.new(application).resign!
            when '.ipa', '.app'
              set_platform!(:ios)
              fail('Can only resign Android applications (apk)')
            else
              fail('Application must be an apk', :resign)
          end
        end
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
calabash-2.0.0.pre11 lib/calabash/cli/resign.rb
calabash-2.0.0.pre10 lib/calabash/cli/resign.rb
calabash-2.0.0.pre9 lib/calabash/cli/resign.rb
calabash-2.0.0.prelegacy4 lib/calabash/cli/resign.rb
calabash-2.0.0.prelegacy3 lib/calabash/cli/resign.rb
calabash-2.0.0.prelegacy2 lib/calabash/cli/resign.rb
calabash-2.0.0.prelegacy lib/calabash/cli/resign.rb
calabash-2.0.0.pre6 lib/calabash/cli/resign.rb
calabash-2.0.0.pre5 lib/calabash/cli/resign.rb
calabash-2.0.0.pre4 lib/calabash/cli/resign.rb
calabash-2.0.0.pre3 lib/calabash/cli/resign.rb