Hamza Yerlikaya
Hamza Yerlikaya

Reputation: 49329

git pull - changes from Java

I have a web app that serves some markdown files. What i would like to do is when there is a push to github i would ping my application using a webhook and i want my application to run git pull to retrieve changes. I am sure that no application specific files will change only markdown files in a specific folder.

Upvotes: 1

Views: 396

Answers (2)

pmf
pmf

Reputation: 7749

Here's how to do it in Clojure (since you have a Clojure-tag on your question): http://infolace.blogspot.com/2009/08/simple-webhooks-with-clojure-and-ring.html

Upvotes: 3

Pod
Pod

Reputation: 4130

http://www.kernel.org/pub/software/scm/git/docs/githooks.html

post-receive

Write a small script that will alert your java program somehow. Or even do the git pull in the script?

Upvotes: 1

Related Questions