0

I have a few plugins created using jQuery, I have the demo's located on my server, I want to automatically update the demo every time a change is commited to the master branch on github.

I know I can use Post-Receive Hooks to get a buzz on my server, that's easy enough, what I don't know how to do yet is get the PHP script to download the latest version of the entire repository from github?

Is there an API to do this, or is there perhaps a direct link to the always latest version of a repository zipped?

Hailwood
  • 89,623
  • 107
  • 270
  • 423

1 Answers1

3

If you add /zipball/master to the end of your project web URL, you will get a zip of the master branch back.

Joachim Isaksson
  • 176,943
  • 25
  • 281
  • 294
  • I think this feature is deprecated, if not already removed. For example, try downloading Kickstrap: https://github.com/ajkochanowicz/Kickstrap/zipball/master – Adam Grant Feb 28 '13 at 18:49
  • @ajkochanowicz Kickstrap doesn't have a master branch, but for example `https://github.com/ajkochanowicz/Kickstrap/zipball/stable` works to get the stable branch. – Joachim Isaksson Feb 28 '13 at 20:04
  • Ohhhhhh. Right. I hope they keep this feature. They recently removed the download button from the UI and I fear they'll eventually get rid of this too as soon as some time passes. – Adam Grant Feb 28 '13 at 21:33