Skip to content

Instantly share code, notes, and snippets.

@the8472
Created August 28, 2014 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the8472/70f2e2b73aa2ef3b17a9 to your computer and use it in GitHub Desktop.
Save the8472/70f2e2b73aa2ef3b17a9 to your computer and use it in GitHub Desktop.
Continuous building for firefox addons
#!/usr/bin/ruby
require "rubygems"
gem "rb-inotify"
require "rb-inotify"
notifier = INotify::Notifier.new
event_handler = proc do
puts "change detected, running CI"
# cfx test -b ~/bin/firefox-nightly &&
`cfx xpi --no-strip-xpi --output-file=integration.xpi && wget --post-file=integration.xpi http://localhost:8888/`
end
notifier.watch("./lib", :modify, :recursive, :dont_follow, &event_handler)
notifier.watch("./data", :modify, :recursive, :dont_follow, &event_handler)
notifier.watch("./test", :modify, :recursive, :dont_follow, &event_handler)
notifier.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment