Mafia versions

StDoodle

Minion
Mafia saves a couple of helpful version-checking properties in your GLOBAL_prefs file, but I'm not sure exactly how they work.


  • lastRelayUpdate : this appears to be the daily build number I'm on, but the wording (esp. "Relay") confuses me.
  • lastRssUpdate
  • lastRssVersion
  • previousUpdateRevision : again, shows my current build
  • previousUpdateVersion
I'm not sure which property is saving what exactly, and how they're updated. If this could be clarified, I (and others) could easily add in notification within a script telling a user to upgrade their mafia version if they'd like to run said script (which would hopefully cut down a bit on some of the "I'm getting X undefined error" posts).

Is it "safe" to simply check previousUpdateRevision and report based on the integer value of that (with of course a "the script can't tell what version you're running" failsafe for an unset value)? Or are there situations in which this number doesn't match the latest build number (I'm not sure what happens, for example, when running a major release).
 

jasonharper

Developer
There isn't anything that will work on both daily and release versions, since each is entirely unaware of the other kind of numbering scheme. And version checking in a script isn't generally going to help, anyway, since a reference to an undefined built-in function will keep the script from running at all.
 

StDoodle

Minion
...version checking in a script isn't generally going to help, anyway, since a reference to an undefined built-in function will keep the script from running at all.

What can be done, though, is to add functionality into an update script (similar to what's available in zLib) such that the required mafia version can be passed to the update script, which then warns the user that they need to upgrade mafia before updating the script (this is what I had in mind).

The more I think about it though, the less sure I am that it will help... most script threads contain a warning regarding the required mafia version, and if people aren't going to read that, then they aren't going to read the CLI warning either. Also, a good chunk of the "WTF this script don't work" posts are from first-time script users, who couldn't be warned... hmm...
 
Top