From: Bharat M. <bh...@me...> - 2011-01-18 04:05:40
|
[this info should find a home on the wiki somewhere, Dave/Kevin/CK can you slot this in somewhere and clean it up a bit?] --- I've added automatic version checking to Gallery 3.0.1, and here's how it works. There are a few moving parts so I'll diagram it out as best I can. Each Gallery 3 install now has a new file called ".build_number". This contains a number that only increases and lets you know the "build" that you have for a particular branch. Every time you do a "git pull" or get a new snapshot, you're going to see this number go up. After you get the latest code and upgrade when you go to Admin > Dashboard you'll see a new block that tells you exactly which version of Gallery you're using and what build it is. The build is drawn from the .build_number file. There's a "check now" button and when you click on that, the Gallery install contacts gallery.menalto.com and gets info about what versions are available. We don't send any information about your install back to the server with this request! As best we can, this is all one way traffic from the Gallery website down to your Gallery install. The gallery website has a version checking service called "versioncheck" that we've been using for years. If you go to this url: http://gallery.menalto.com/versioncheck/gallery3 It lists version and build info for the official release and each development branch. When Gallery notices that the build number has gone up on your development branch, or that the release version has gone up, it'll notify you and give you links to upgrade or be reminded later. By default, this checking happens automatically once a week. You can disable the automatic checking at Admin > Dashboard. We want automatic checking on by default though because we strongly want to encourage users to stay current. Behind the scenes there's some tricky bits in getting the .build_number file to be updated. Unlike subversion and other centralized revision control systems, git has no single version number. So to get the .build_number file to have an ever-increasing number, I'm running an automated script that scans for changes in any of the branches (currently it's only looking at 3.0.x and master) and bumps the .build_number when sees a change. It also bumps the versioncheck number in the database. When you do an upgrade, we automatically clear the version check string in your Gallery 3 install assuming that you have the latest code. So if you're a git user and you do "git pull", it will get cleared when you run "php index.php upgrade" (which you should be running after you do git pull anyway). Thoughts/comments welcome. -Bharat |