Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

… into appcelerator_master
  • Loading branch information...
commit 432dfc3725cbb3f7492f782c96a759efc4b11635 2 parents ca56bfc + e56cf20
authored December 16, 2011
7  mobile/driver.sh
@@ -3,17 +3,14 @@
3 3
 # A hudson build driver for Titanium Mobile 
4 4
 
5 5
 export PATH=/bin:/usr/bin:$PATH
6  
-scons package_all=1 $TI_MOBILE_SCONS_ARGS
7 6
 
8 7
 GIT_BRANCH=$1
9 8
 GIT_REVISION=`git log --pretty=oneline -n 1 | sed 's/ .*//' | tr -d '\n' | tr -d '\r'`
10 9
 VERSION=`python $TITANIUM_BUILD/common/get_version.py | tr -d '\r'`
11 10
 TIMESTAMP=`date +'%Y%m%d%H%M%S'`
12  
-BASENAME=dist/mobilesdk-$VERSION-$TIMESTAMP
  11
+BASENAME=dist/mobilesdk-$VERSION.v$TIMESTAMP
13 12
 
14  
-mv dist/mobilesdk-$VERSION-osx.zip $BASENAME-osx.zip
15  
-mv dist/mobilesdk-$VERSION-win32.zip $BASENAME-win32.zip
16  
-mv dist/mobilesdk-$VERSION-linux.zip $BASENAME-linux.zip
  13
+scons package_all=1 version_tag=$VERSION.v$TIMESTAMP $TI_MOBILE_SCONS_ARGS
17 14
 
18 15
 if [ "$PYTHON" = "" ]; then
19 16
 	PYTHON=python
1  web/index.html
@@ -2,6 +2,7 @@
2 2
 <head>
3 3
 	<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" title="stylesheet" charset="utf-8">
4 4
 	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  5
+	<script src="js/jquery.ba-bbq.min.js"></script>
5 6
 	<script src="js/date.js"></script>
6 7
 	<script src="js/main.js"></script>
7 8
 </head>
18  web/js/jquery.ba-bbq.min.js
... ...
@@ -0,0 +1,18 @@
  1
+/*
  2
+ * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
  3
+ * http://benalman.com/projects/jquery-bbq-plugin/
  4
+ * 
  5
+ * Copyright (c) 2010 "Cowboy" Ben Alman
  6
+ * Dual licensed under the MIT and GPL licenses.
  7
+ * http://benalman.com/about/license/
  8
+ */
  9
+(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
  10
+/*
  11
+ * jQuery hashchange event - v1.2 - 2/11/2010
  12
+ * http://benalman.com/projects/jquery-hashchange-plugin/
  13
+ * 
  14
+ * Copyright (c) 2010 "Cowboy" Ben Alman
  15
+ * Dual licensed under the MIT and GPL licenses.
  16
+ * http://benalman.com/about/license/
  17
+ */
  18
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
32  web/js/main.js
@@ -7,9 +7,18 @@ $(document).ready(function() {
7 7
 		},
8 8
 		desktop: {osx: "OSX", linux: "Linux", win32: "Windows"}
9 9
 	};
  10
+
10 11
 	var mobileGitUrl = "http://github.com/appcelerator/titanium_mobile/commit/";
11 12
 	var desktopGitUrl = "http://github.com/appcelerator/titanium_desktop/commit/";
12  
-	
  13
+	var showMobileBranch, showDesktopBranch;
  14
+	var params = $.deparam.querystring();
  15
+	if ("mobile_branch" in params) {
  16
+		showMobileBranch = params.mobile_branch;
  17
+	}
  18
+	if ("desktop_branch" in params) {
  19
+		showDesktopBranch = params.desktop_branch;
  20
+	}
  21
+
13 22
 	function appendRevision(type, revision, files) {
14 23
 		var url = (type=="mobile" ? mobileGitUrl : desktopGitUrl) + revision;
15 24
 		
@@ -32,7 +41,8 @@ $(document).ready(function() {
32 41
 	}
33 42
 	
34 43
 	function getPlatform(file) {
35  
-		var last = file.filename.split("-")[3];
  44
+		var tokens = file.filename.split("-");
  45
+		var last = tokens[tokens.length - 1];
36 46
 		return last.substring(0, last.length-4);
37 47
 	}
38 48
 	
@@ -59,14 +69,18 @@ $(document).ready(function() {
59 69
 		select.attr('disabled', null);
60 70
 		
61 71
 		var defaultBranch = 'master';
62  
-		if ('defaultBranch' in branches) {
  72
+		if (showDesktopBranch && type == "desktop") {
  73
+			defaultBranch = showDesktopBranch;
  74
+		} else if (showMobileBranch && type == "mobile") {
  75
+			defaultBranch = showMobileBranch;
  76
+		} else if ('defaultBranch' in branches) {
63 77
 			defaultBranch = branches.defaultBranch;
64 78
 		} else {
65 79
 			if ('branches' in branches && branches.branches.length > 0) {
66 80
 				defaultBranch = branches.branches[0]
67 81
 			}
68 82
 		}
69  
-		
  83
+
70 84
 		$.each(branches.branches, function(index, branch) {
71 85
 			var option = $('<option></option>').attr('value', branch).text(branch);
72 86
 			if (branch == defaultBranch) {
@@ -92,7 +106,13 @@ $(document).ready(function() {
92 106
 		var revisionIndexes = [];
93 107
 		for (var i = 0; i < data.length; i++) {
94 108
 			var file = data[i];
95  
-			var timestamp = file.filename.split("-")[2];
  109
+			var tokens = file.filename.split("-");
  110
+			var timestamp, vTimestamp;
  111
+			if ((vTimestamp = tokens[1].indexOf("v")) != -1) {
  112
+				timestamp = tokens[1].substring(vTimestamp + 1);
  113
+			} else {
  114
+				timestamp = tokens[2];
  115
+			}
96 116
 			var date = new Date();
97 117
 			date.setFullYear(timestamp.substring(0,4), timestamp.substring(4,6)-1, timestamp.substring(6,8));
98 118
 			date.setHours(timestamp.substring(8,10));
@@ -121,7 +141,7 @@ $(document).ready(function() {
121 141
 			appendRevision(type, revision, revisions[revision]);
122 142
 		});
123 143
 	}
124  
-	
  144
+
125 145
 	$('body').ajaxError(function(event, xhr, settings, exception) {
126 146
 		var type = settings.url.substring(0, settings.url.lastIndexOf('/'));
127 147
 		$('#'+type+'_table').html('<tr><td>No builds found</td></tr>');

0 notes on commit 432dfc3

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