git/list[1] front-page[2] threads[3] people[4] search[5] about
 

post-receive hooks based on push content

From
JLJessica Lucci <jessicalucci14@gmail.com>
Date
Jul 31, 2012, 18:27 UTC
Message-ID
<CAC=i8BzHi6UF=GEAiEdUzcjQM3NjibPw=p5S2uOeaE31nDkkjA@mail.gmail.com>
Hey guys,

I'm trying to set up a post-receive hook that redirects code based on the content of the actual push. Specifically, I'm trying to set up automatic deployment of web apps with the option of sending the code to a build farm first. For example, if you push your code to a git repo, there should be a post-receive hook in there that looks to see if /www is empty or something. If /www is empty, the app has yet to be "built", so the hook should push the code to a build farm that can compile the code into a WAR file (or whatever is appropriate). If /www is already populated, we assume the code has already been compiled and will then push the code directly onto the node.

So, first of all, is this even possible? And if so, how would I go about writing this specific hook?

Thanks for your time! Jessica

Next: Junio C Hamano
Message 1 of 2 in “post-receive hooks based on push content”
  1. Jessica LucciJul 31, 2012
  2. Junio C HamanoJul 31, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.