Sha256: e52f79e50b40fb703c2b1da11d84dd6f6362d3d47d9536fb64e97d1d95f13fdb

Contents?: true

Size: 790 Bytes

Versions: 6

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

module GoNative
  module Commands
    module Android
      class  Publish < Base
        desc 'Used to update one of the android internal dependencies'
        include Helpers::GradleVersionReader

        def call
          assert_build_file_exists!
          create_and_push_tag!
        end

        def assert_build_file_exists!
          return unless gradle_file.empty?

          raise Error, 'No build.gradle file exists'
        end

        private

        def create_and_push_tag!
          return if system("git tag | grep #{version} > /dev/null")

          system "git add -A && git commit -m \"Releases #{version}.\""
          system "git tag #{version}"
          system 'git push && git push --tags'
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gonative-cli-1.4.4 lib/gonative/commands/android/publish.rb
gonative-cli-1.4.3 lib/gonative/commands/android/publish.rb
gonative-cli-1.4.2 lib/gonative/commands/android/publish.rb
gonative-cli-1.4.1 lib/gonative/commands/android/publish.rb
gonative-cli-1.4.0 lib/gonative/commands/android/publish.rb
gonative-cli-1.3.9 lib/gonative/commands/android/publish.rb