Sha256: 5ebab303a9b3c0486213e7f31a21060e8401e1b9323119301ebb584ae51a0c65

Contents?: true

Size: 1.28 KB

Versions: 34

Compression:

Stored size: 1.28 KB

Contents

# frozen_string_literal: true

require "thor"

require_relative "../make_pr/base"

module Neetob
  class CLI
    module Github
      module Gems
        class Release < MakePr::Base
          attr_accessor :gems, :sandbox

          def initialize(gems, sandbox = false)
            super()
            @gems = gems
            @sandbox = sandbox
          end

          def run
            matching_gems = find_all_matching_gems(gems)
            delete_and_create_temp_neetob_dir
            matching_gems.each do |gem|
              ui.info("\nWorking on #{gem}\n")
              begin
                shallow_clone_repo_in_tmp_dir!("bigbinary/#{gem}")
                build_gem(gem)
                release_gem(gem)
                if $?.success?
                  ui.success("Gem \"#{gem}\" released successfully")
                end
              rescue StandardError => e
                ExceptionHandler.new(e).process
              end
            end
            `rm -rf /tmp/neetob`
          end

          private

            def build_gem(gem)
              ui.info(`#{cd_to_repo(gem)} && gem build`)
            end

            def release_gem(gem)
              ui.info(`#{cd_to_repo(gem)} && fury push #{gem}-*.gem --as neeto-live`)
            end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
neetob-0.5.16 lib/neetob/cli/github/gems/release.rb
neetob-0.5.15 lib/neetob/cli/github/gems/release.rb
neetob-0.5.14 lib/neetob/cli/github/gems/release.rb
neetob-0.5.13 lib/neetob/cli/github/gems/release.rb
neetob-0.5.12 lib/neetob/cli/github/gems/release.rb
neetob-0.5.11 lib/neetob/cli/github/gems/release.rb
neetob-0.5.10 lib/neetob/cli/github/gems/release.rb
neetob-0.5.9 lib/neetob/cli/github/gems/release.rb
neetob-0.5.8 lib/neetob/cli/github/gems/release.rb
neetob-0.5.7 lib/neetob/cli/github/gems/release.rb
neetob-0.5.6 lib/neetob/cli/github/gems/release.rb
neetob-0.5.5 lib/neetob/cli/github/gems/release.rb
neetob-0.5.4 lib/neetob/cli/github/gems/release.rb
neetob-0.5.3 lib/neetob/cli/github/gems/release.rb
neetob-0.5.2 lib/neetob/cli/github/gems/release.rb
neetob-0.5.1 lib/neetob/cli/github/gems/release.rb
neetob-0.5.0 lib/neetob/cli/github/gems/release.rb
neetob-0.4.37 lib/neetob/cli/github/gems/release.rb
neetob-0.4.36 lib/neetob/cli/github/gems/release.rb
neetob-0.4.35 lib/neetob/cli/github/gems/release.rb