Hacker Public Radio

HPR2446: Git server and git hooks


Listen Later

A sample post-receive git hook:
#!/usr/bin/tcsh
foreach arg ( $< )
set argv = ( $arg )
set refname = $1
end
set branch = `git rev-parse --symbolic --abbrev-ref $refname`
echo $branch
if ( "$branch" == "master" ) then
echo "Branch detected: master"
echo "Do some stuff here."
else if ( "$branch" == "dev" ) then
echo "Branch detected: dev"
echo "Do something else here."
else
echo "Do something entirely different here."
endif
...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
The Infinite Monkey Cage by BBC Radio 4

The Infinite Monkey Cage

1,952 Listeners

Click Here by Recorded Future News

Click Here

418 Listeners

Hacker And The Fed by Chris Tarbell & Hector Monsegur

Hacker And The Fed

168 Listeners