Last active
December 22, 2015 10:58
-
-
Save bolasblack/6462220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
description 'exec git push after save page' | |
Page.hook :after_commit do | |
Olelo.logger.info "push git history after save page" | |
git_path = Config[:repository][:git][:path] | |
response = `git --git-dir=#{git_path} --bare push origin master 2>&1` | |
if $?.success? | |
Olelo.logger.info "git history push success" | |
else | |
Olelo.logger.error "git history push failure, reason: #{response}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment