Class: Ruby::PublishGem

Inherits:
Object
  • Object
show all
Defined in:
lib/scripts/ruby/publish_gem.rb

Instance Method Summary collapse

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/scripts/ruby/publish_gem.rb', line 3

def run
  # Bundler release scripts
  # https://github.com/bundler/bundler/blob/master/lib/bundler/gem_helper.rb
  # also gemspec loading https://github.com/bundler/bundler/blob/ff4a522e8e75eb4ce5675a99698fb3df23b680be/lib/bundler.rb#L406
  out = capture_command("bundle", "exec", "rake", "-T")

  if out.include?("rake release[remote]")
    command("bundle", "exec", "rake", "release")
  else
    log_error("bundler/gem_tasks is required to use this script")
  end
end