[gnome-ostree] autobuilder: Restore meta.json that the web UI depends on



commit c175ab1ce6368116af9f612f4198c84990ff8eb3
Author: Colin Walters <walters verbum org>
Date:   Mon Jan 21 21:30:02 2013 -0500

    autobuilder: Restore meta.json that the web UI depends on

 src/ostbuild/js/builtins/autobuilder.js |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/ostbuild/js/builtins/autobuilder.js b/src/ostbuild/js/builtins/autobuilder.js
index 6ad6f33..a2bcfaa 100644
--- a/src/ostbuild/js/builtins/autobuilder.js
+++ b/src/ostbuild/js/builtins/autobuilder.js
@@ -198,6 +198,12 @@ const AutoBuilder = new Lang.Class({
 	let tmpSnapshotPath = workdir.get_child(snapshotName);
 	GSystem.file_linkcopy(this._source_snapshot_path, tmpSnapshotPath,
 			      Gio.FileCopyFlags.OVERWRITE, cancellable);	
+
+	let version = this._src_db.parseVersionStr(this._source_snapshot_path.get_basename());
+	let meta = {'version': version,
+		    'version-path': this._snapshot_dir.get_relative_path(this._source_snapshot_path)};
+	let metaPath = workdir.get_child('meta.json');
+	JsonUtil.writeJsonFileAtomic(metaPath, meta, cancellable);
 	
 	let args = ['ostbuild', 'build', '--snapshot=' + snapshotName];
 	args.push.apply(args, this._queued_force_builds);



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