Skip to content

Instantly share code, notes, and snippets.

@bernardo-cs
Created March 31, 2015 09:53
Show Gist options
  • Save bernardo-cs/dc2d8c244cebab3d2b13 to your computer and use it in GitHub Desktop.
Save bernardo-cs/dc2d8c244cebab3d2b13 to your computer and use it in GitHub Desktop.
pre push git hook to build middleman release
#!/bin/sh
echo "building latest release"
rake gitbuild
exit 0
task :gitbuild do
build_status = false
Dir.chdir('middleman') do
build_status = system("middleman build")
end
if build_status
system("git add .")
system("git commit -am 'AUTO BUILD AT: #{Time.now.getutc}'")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment