Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (19 sloc) 645 Bytes
# Run me with:
# $ watchr gem.watchr
def gemspec() Dir['*.gemspec'].first end
# --------------------------------------------------
# Rules
# --------------------------------------------------
watch( gemspec ) { build }
# --------------------------------------------------
# Signal Handling
# --------------------------------------------------
Signal.trap('QUIT') { build } # Ctrl-\
Signal.trap('INT' ) { abort("\n") } # Ctrl-C
# --------------------------------------------------
# Helpers
# --------------------------------------------------
def build
puts; system "gem build #{gemspec}"
FileUtils.mv( Dir['*.gem'], 'pkg/' )
end
Jump to Line
Something went wrong with that request. Please try again.