Posts Tagged ‘code’

6th December
2008
written by Nick Anderson

Some projects have production code that runs off of a git cloned repository. There may be a case in which you want to notify others when that clone pulls. It is a pretty easy feat with gits post-merge hook. The post-merge hook will run after a merge (think git pull). All you have to do it create a project/.git/hooks/post-merge shell script and chmod +x it. Next time you pull successfully that script will run. Here is an example.

#!/bin/bash
TEMPLOG=$(mktemp)
echo "Sending email notification of update"
git log --reverse --no-merges --stat @{1}.. < $TEMPLOG
sendEmail -u "Production code update notification" -t [email protected] < $TEMPLOG
rm $TEMPLOG
Tags: , , , ,
7th April
2008
written by Nick Anderson

Disclaimer: I did not write the bash support for syntaxhighlighter bboy.mr.freeze did and it can also be found here . All I did was take that, and modify SyntaxHighlighter Plus to take advantage of it. (more…)

BLOGROLL

ARCHIVE