Getting the latest daily build

matt.chugg

Moderator
Theres a couple of updater tools on here, and since the rss feed contains a regularily updated database I thought i'd make things a bit easier for people

http://mattchugg.com/kolmafia/latest.php will automatically redirect to the latest jar file, if the latested commit hasn't been built yet it will redirect to the latest available build.

How it works:

Grab ten latest revisions from data base ORDER BY revision DESC
Starting with latest, generate url, check file exists using get_headers() if it does, break out of the loop and redirect to download, if it doesn't try the next one until if finds an available download
if all ten are unavailable (probably due to a server buiing down, or the build process being fubarred) it will send a 404 header and error message

As you can see , this pings the kolmafia.us server before redirecting to check if the build is available, this means that downloading the latest build is as simple as possible, but it does mean a tiny amount of traffic to the kolmafia server, if this is a problem (fewyn?), i'll change it to cache the last result.

Happy updating!
 
Top