Skip to content

Commit

Permalink
make pre_release more generic with bare option
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Apr 6, 2012
1 parent a0e1b5f commit 5953ac6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions boson/commands/personal/gem_release.rb
Expand Up @@ -3,17 +3,21 @@ def self.config
{:dependencies=>['public/release', 'exp/paz', 'exp/readme', 'personal/system_misc']}
end

# @options :test => true, :sync => true
# @options :test => true, :sync => true, :bare => false
# Checklist to run before releasing a gem
def pre_release(options={})
raise "Repo not clean" if !`git status -s`.empty?
options.update(test: false, sync: false) if options[:bare]

puts "Sync description from readme to gemspec..."
sync_description(:commit=>true) if options[:sync]

puts "Check deps.rip..."
deps_rip
deps_rip :dev=>true
system "git commit -m 'Update deps.rip' ." if !`git status -s`.empty?
unless options[:bare]
puts "Check deps.rip..."
deps_rip
deps_rip :dev=>true
system "git commit -m 'Update deps.rip' ." if !`git status -s`.empty?
end

puts "Check backup files to delete..."
delete_backups unless Dir.glob('**/*~', File::FNM_DOTMATCH).empty?
Expand Down

0 comments on commit 5953ac6

Please sign in to comment.