mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Add a Rake task and Sinatra script for a GitHub post-receive hook.
This commit is contained in:
parent
c24c4ffcd5
commit
398bbe0304
2 changed files with 17 additions and 0 deletions
4
Rakefile
4
Rakefile
|
@ -116,6 +116,10 @@ task :release_edge do
|
|||
sh %{rubyforge add_release haml haml-edge "Bleeding Edge (v#{edge_version})" pkg/haml-edge-#{edge_version}.gem}
|
||||
end
|
||||
|
||||
task :watch_for_edge_update do
|
||||
sh %{ruby edge_gem_watch.rb}
|
||||
end
|
||||
|
||||
# ----- Documentation -----
|
||||
|
||||
begin
|
||||
|
|
13
extra/edge_gem_watch.rb
Normal file
13
extra/edge_gem_watch.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
require 'rubygems'
|
||||
require 'sinatra'
|
||||
require 'json'
|
||||
set :port, 3123
|
||||
set :environment, :production
|
||||
Dir.chdir(File.dirname(__FILE__) + "/..")
|
||||
|
||||
post "/" do
|
||||
payload = JSON.parse(params["payload"])
|
||||
|
||||
break unless payload["ref"] == "refs/heads/master"
|
||||
system("rake release_edge &> edge-gem-output.log")
|
||||
end
|
Loading…
Reference in a new issue