Results 1 to 2 of 2

Thread: Getting the latest daily build

  1. #1
    Senior Member matt.chugg's Avatar
    Join Date
    Nov 2006
    Posts
    617

    Default Getting the latest daily build

    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!

  2. #2
    Senior Member
    Join Date
    Jul 2007
    Posts
    1,193

    Default

    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.
    Originally Posted by matt.chugg View Post
    Each HTTP header response is around 280 bytes long, whereas a single hit to http://builds.kolmafia.us/ is closer 15000 bytes long. Somehow I don't think fewyn is going to mind :P I guess it's only polite to ask, though.

    Nice work

Similar Threads

  1. Bug - Cannot Reproduce Latest build (10572) problems with equipment with single quotes in
    By Terragon in forum Bug Reports
    Replies: 11
    Last Post: 05-01-2016, 04:57 PM
  2. The latest Daily Build
    By dangerpin in forum Unofficial Builds
    Replies: 238
    Last Post: 06-11-2013, 08:44 PM
  3. Latest EXE Build broken?
    By kitsunenine in forum Community Support
    Replies: 3
    Last Post: 06-14-2011, 09:03 AM
  4. Replies: 0
    Last Post: 11-04-2010, 12:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •