[gnome-continuous] autobuilder: Write a meta.json containing the build ID to each build



commit 63ac3d9247f242fa74edc450700ac37bf3bb1d94
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 9 15:41:46 2013 -0400

    autobuilder: Write a meta.json containing the build ID to each build

 src/js/builtins/autobuilder.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/js/builtins/autobuilder.js b/src/js/builtins/autobuilder.js
index c89ca6b..6bfbd42 100644
--- a/src/js/builtins/autobuilder.js
+++ b/src/js/builtins/autobuilder.js
@@ -153,6 +153,13 @@ const Autobuilder = new Lang.Class({
             return null;
     },
 
+    _fillBuildDirectory: function(buildPath, cancellable) {
+        let version = buildPath.get_basename();
+
+        let meta = { "version": version };
+        JsonUtil.writeJsonFileAtomic(buildPath.get_child('meta.json'), meta, cancellable);
+    },
+
     _getNextBuildDirectory: function(cancellable) {
         let currentTime = GLib.DateTime.new_now_utc();
         let currentYmd = Format.vprintf('%d%02d%02d', [currentTime.get_year(),
@@ -182,6 +189,8 @@ const Autobuilder = new Lang.Class({
             BuildUtil.atomicSymlinkSwap(buildPath.get_child('last-build'), lastBuildPath, null);
         }
 
+        this._fillBuildDirectory(buildPath, cancellable);
+
         return buildPath;
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]