diff --git a/application/Init/Init.php b/application/Init/Init.php index a4abe2daf..fe782d108 100644 --- a/application/Init/Init.php +++ b/application/Init/Init.php @@ -1,2 +1,10 @@ layout()->set("git_merge_ts", $last_merge_ts->value()); diff --git a/bin/post_merge_hook.php b/bin/post_merge_hook.php new file mode 100755 index 000000000..9a214dceb --- /dev/null +++ b/bin/post_merge_hook.php @@ -0,0 +1,41 @@ +#!/usr/bin/php +id); +define("INTERNAL_USER_USERNAME", $me->username); + +$now = date("U"); + +// update last merge timestamp +$merge_ts = new mfConfig("git.merge.ts"); +$merge_ts->type("int"); +$merge_ts->value($now); +$merge_ts->save(); + + +// update git commit ref +$git_ref = new mfConfig("git.lastref"); + +$sc = new SystemController(); +$commitid = $sc->getLastCommit(); + +if($commitid) { + $git_ref->value($commitid); + $git_ref->save(); +}