Commit 02ad9fcd authored by iwakeh's avatar iwakeh Committed by Karsten Loesing
Browse files

Write build revision to index.json files.

Implements part of task-21414.
Adapt IndexNode to supply a revision.
parent 992bf36a
# Changes in version 2.?.? - 2017-??-??
* Medium changes
- Add new optional "build_revision" field to index.json with the
Git revision supplied by the calling software.
# Changes in version 2.1.0 - 2017-09-15
* Major changes
......
build @ 78e533fd
Subproject commit a64b94a635e5396266d5c5b5cf88850b9f4b6a24
Subproject commit 78e533fdc84e20769a8a155d1426cbea59c6e7cc
......@@ -46,6 +46,11 @@ public class IndexNode {
@SerializedName("index_created")
public final String created;
/** The software's build revision JSON as 'build_revision' field. */
@Expose
@SerializedName("build_revision")
public final String revision;
/** Path (i.e. base url) is exposed in JSON. */
@Expose
public final String path;
......@@ -60,20 +65,29 @@ public class IndexNode {
/* Added to satisfy Gson. */
private IndexNode() {
created = null;
path = null;
files = null;
directories = null;
this.created = null;
this.revision = null;
this.path = null;
this.files = null;
this.directories = null;
}
/** An index node is the top-level node in the JSON structure. */
/** For backwards compatibility and testing. */
public IndexNode(String created, String path,
SortedSet<FileNode> files,
SortedSet<DirectoryNode> directories) {
this(created, null, path, files, directories);
}
/** An index node is the top-level node in the JSON structure. */
public IndexNode(String created, String revision, String path,
SortedSet<FileNode> files,
SortedSet<DirectoryNode> directories) {
this.created = created;
this.revision = revision;
this.path = path;
this.files = files;
this.directories = directories;
this.created = created;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment