Permalink
Browse files

Merge branch 'master' of git://github.com/appcelerator/titanium_build…

… into appcelerator_master
  • Loading branch information...
root root
root authored and root committed Dec 16, 2011
2 parents ca56bfc + e56cf20 commit 432dfc3725cbb3f7492f782c96a759efc4b11635
Showing with 47 additions and 11 deletions.
  1. +2 −5 mobile/driver.sh
  2. +1 −0 web/index.html
  3. +18 −0 web/js/jquery.ba-bbq.min.js
  4. +26 −6 web/js/main.js
View
@@ -3,17 +3,14 @@
# A hudson build driver for Titanium Mobile
export PATH=/bin:/usr/bin:$PATH
-scons package_all=1 $TI_MOBILE_SCONS_ARGS
GIT_BRANCH=$1
GIT_REVISION=`git log --pretty=oneline -n 1 | sed 's/ .*//' | tr -d '\n' | tr -d '\r'`
VERSION=`python $TITANIUM_BUILD/common/get_version.py | tr -d '\r'`
TIMESTAMP=`date +'%Y%m%d%H%M%S'`
-BASENAME=dist/mobilesdk-$VERSION-$TIMESTAMP
+BASENAME=dist/mobilesdk-$VERSION.v$TIMESTAMP
-mv dist/mobilesdk-$VERSION-osx.zip $BASENAME-osx.zip
-mv dist/mobilesdk-$VERSION-win32.zip $BASENAME-win32.zip
-mv dist/mobilesdk-$VERSION-linux.zip $BASENAME-linux.zip
+scons package_all=1 version_tag=$VERSION.v$TIMESTAMP $TI_MOBILE_SCONS_ARGS
if [ "$PYTHON" = "" ]; then
PYTHON=python
View
@@ -2,6 +2,7 @@
<head>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="stylesheet" charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+ <script src="js/jquery.ba-bbq.min.js"></script>
<script src="js/date.js"></script>
<script src="js/main.js"></script>
</head>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -7,9 +7,18 @@ $(document).ready(function() {
},
desktop: {osx: "OSX", linux: "Linux", win32: "Windows"}
};
+
var mobileGitUrl = "http://github.com/appcelerator/titanium_mobile/commit/";
var desktopGitUrl = "http://github.com/appcelerator/titanium_desktop/commit/";
-
+ var showMobileBranch, showDesktopBranch;
+ var params = $.deparam.querystring();
+ if ("mobile_branch" in params) {
+ showMobileBranch = params.mobile_branch;
+ }
+ if ("desktop_branch" in params) {
+ showDesktopBranch = params.desktop_branch;
+ }
+
function appendRevision(type, revision, files) {
var url = (type=="mobile" ? mobileGitUrl : desktopGitUrl) + revision;
@@ -32,7 +41,8 @@ $(document).ready(function() {
}
function getPlatform(file) {
- var last = file.filename.split("-")[3];
+ var tokens = file.filename.split("-");
+ var last = tokens[tokens.length - 1];
return last.substring(0, last.length-4);
}
@@ -59,14 +69,18 @@ $(document).ready(function() {
select.attr('disabled', null);
var defaultBranch = 'master';
- if ('defaultBranch' in branches) {
+ if (showDesktopBranch && type == "desktop") {
+ defaultBranch = showDesktopBranch;
+ } else if (showMobileBranch && type == "mobile") {
+ defaultBranch = showMobileBranch;
+ } else if ('defaultBranch' in branches) {
defaultBranch = branches.defaultBranch;
} else {
if ('branches' in branches && branches.branches.length > 0) {
defaultBranch = branches.branches[0]
}
}
-
+
$.each(branches.branches, function(index, branch) {
var option = $('<option></option>').attr('value', branch).text(branch);
if (branch == defaultBranch) {
@@ -92,7 +106,13 @@ $(document).ready(function() {
var revisionIndexes = [];
for (var i = 0; i < data.length; i++) {
var file = data[i];
- var timestamp = file.filename.split("-")[2];
+ var tokens = file.filename.split("-");
+ var timestamp, vTimestamp;
+ if ((vTimestamp = tokens[1].indexOf("v")) != -1) {
+ timestamp = tokens[1].substring(vTimestamp + 1);
+ } else {
+ timestamp = tokens[2];
+ }
var date = new Date();
date.setFullYear(timestamp.substring(0,4), timestamp.substring(4,6)-1, timestamp.substring(6,8));
date.setHours(timestamp.substring(8,10));
@@ -121,7 +141,7 @@ $(document).ready(function() {
appendRevision(type, revision, revisions[revision]);
});
}
-
+
$('body').ajaxError(function(event, xhr, settings, exception) {
var type = settings.url.substring(0, settings.url.lastIndexOf('/'));
$('#'+type+'_table').html('<tr><td>No builds found</td></tr>');

0 comments on commit 432dfc3

Please sign in to comment.