Sha256: 0a5bffa41985bd72ff2265691bb2e3f289bd5a07c2db4af4c5405b031243bcaf

Contents?: true

Size: 678 Bytes

Versions: 1

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

module GoNative
  module Plugins
    module IOS
      class Verify
        extend DSL::Serviceable
        
        def call
          assert_valid_plugin!
          assert_staging_clear!
        end

        def assert_valid_plugin!
          return if File.file?('create-framework.sh')
          
          raise Error, "File 'create-framework.sh' does not exist. Please make sure this is a valid GoNative plugin directory"
        end
        
        def assert_staging_clear!
          return if `git status --porcelain`.empty?

          raise Error, "There are uncommitted changes in the repository"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gonative-cli-0.7.0 lib/gonative/plugins/ios/verify.rb