Skip to content
Browse files

Add beta download channel and flat JSON-based version updater

  • Loading branch information...
1 parent 1405712 commit adcf30b154490eecfcfd5cf98b29df99912c6565 @ginatrapani ginatrapani committed Mar 23, 2012
Showing with 20 additions and 0 deletions.
  1. +4 −0 version.beta.inc.php
  2. +1 −0 version.json
  3. +1 −0 version_beta.json
  4. +14 −0 version_download_beta.php
View
4 version.beta.inc.php
@@ -0,0 +1,4 @@
+<?php
+//Edit this file on each new release
+$current_version = "1.0.4-b2";
+$current_version_download_link = "http://thinkupapp.com/downloads/beta/thinkup_1.0.4-b2.zip";
View
1 version.json
@@ -0,0 +1 @@
+{"version":"1.0.3", "url":"https://github.com/downloads/ginatrapani/ThinkUp/thinkup_1.0.3.zip"}
View
1 version_beta.json
@@ -0,0 +1 @@
+{"version":"1.0.4-beta.1", "url":"http://thinkupapp.com/downloads/beta/thinkup_1.0.4-beta.1.zip"}
View
14 version_download_beta.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Return current version and download location in JSON format, with override for web updater tests.
+ */
+require_once('version.beta.inc.php');
+header('Content-type: application/json');
+
+// Test override
+if (isset($_GET['version']) && isset($_GET['url'])) {
+ $current_version = $_GET['version'];
+ $current_version_download_link = $_GET['url'];
+}
+?>
+{"version":"<?= $current_version ?>", "url":"<?= $current_version_download_link ?>"}

0 comments on commit adcf30b

Please sign in to comment.
Something went wrong with that request. Please try again.