cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: Stamp builds with a more useful commit comment.
Date Tue, 30 Apr 2013 17:37:32 GMT
Updated Branches:
  refs/heads/master 1d38d6ffe -> abc9de8e2


Stamp builds with a more useful commit comment.

For releases, uses the release tag + git commit.
For dev builds, uses "dev" + git commit.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/abc9de8e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/abc9de8e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/abc9de8e

Branch: refs/heads/master
Commit: abc9de8e2c0097034217d1d5763c580185a568a8
Parents: 1d38d6f
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Apr 30 13:36:37 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Apr 30 13:36:37 2013 -0400

----------------------------------------------------------------------
 Jakefile |   42 +++++++++++++++++++++---------------------
 1 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/abc9de8e/Jakefile
----------------------------------------------------------------------
diff --git a/Jakefile b/Jakefile
index 5acee33..fab22a0 100644
--- a/Jakefile
+++ b/Jakefile
@@ -60,6 +60,12 @@ function forEachFile(root, cbFile, cbDone) {
     scan(root);
 }
 
+function computeGitVersion(callback) {
+    childProcess.exec('git describe --tags --long', function(err, stdout, stderr) {
+        var version = stdout.trim().replace(/^2.5.0-.*?-/, 'dev-');
+        callback(version);
+    });
+}
 
 desc("runs build");
 task('default', ['build','test'], function () {});
@@ -78,27 +84,21 @@ task('clean', ['set-cwd'], function () {
 desc("compiles the source files for all extensions");
 task('build', ['clean', 'hint', 'update-version'], function () {
     var packager = require("./build/packager");
-    var commitId = "";
-    childProcess.exec("git log -1",function(err,stdout,stderr) {
-        var stdoutLines = stdout.split("\n");
-        if(stdoutLines.length > 0) {
-            commitId = stdoutLines[0];
-        }
-        
-        console.log("building " + commitId);
-
-        packager.generate("windows8",commitId,true);
-        packager.generate("blackberry",commitId);
-        packager.generate("firefoxos",commitId);
-        packager.generate("ios",commitId);
-        packager.generate("windowsphone",commitId,true);
-        packager.generate("android",commitId);
-        packager.generate("bada",commitId);
-        packager.generate("tizen",commitId);
-        packager.generate("webos", commitId);
-        packager.generate("osx", commitId);
-        packager.generate("errgen",commitId);
-        packager.generate("test",commitId);
+    computeGitVersion(function(version) {
+        console.log("building " + version);
+
+        packager.generate("windows8", version,true);
+        packager.generate("blackberry", version);
+        packager.generate("firefoxos", version);
+        packager.generate("ios", version);
+        packager.generate("windowsphone", version,true);
+        packager.generate("android", version);
+        packager.generate("bada", version);
+        packager.generate("tizen", version);
+        packager.generate("webos",  version);
+        packager.generate("osx",  version);
+        packager.generate("errgen", version);
+        packager.generate("test", version);
         complete();
     });
 }, true);


Mime
View raw message