Fetch latest version automatically.

This commit is contained in:
Daniel Buckmaster 2015-02-07 11:16:05 +11:00
parent 34f60dc4df
commit 7343667b50

View file

@ -96,7 +96,7 @@ root: .
<table class="borderless table">
<tr>
<td>Current version</td>
<td><a href="http://wiki.torque3d.org/release:three-six-two">3.6.2</a></td>
<td id="current-version">...</td>
</tr>
<tr>
<td>Continuous integration</td>
@ -219,5 +219,17 @@ $(document).ready(function() {
}
}
});
$.get('http://api.github.com/repos/GarageGames/Torque3D/releases')
.done(function(releases) {
var latest = releases[0];
$('#current-version').html($('<a/>')
.attr('href', latest.html_url)
.html(latest.name)
);
})
.fail(function() {
$('#curent-version').html('error');
});
});
</script>