Skip to content

Commit

Permalink
Remove unneeded fields from db metadata (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek authored Jan 23, 2025
1 parent 3facb05 commit d968694
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10904,9 +10904,19 @@ private void generateDataFile(DBBuilder db) throws IOException, FHIRException, S
data.add("toolingVersion", Constants.VERSION);
data.add("toolingRevision", ToolsVersion.TOOLS_VERSION_STR);
data.add("toolingVersionFull", Constants.VERSION+" ("+ToolsVersion.TOOLS_VERSION_STR+")");

data.add("genDate", genTime());
data.add("genDay", genDate());
if (db != null) {
for (JsonProperty p : data.getProperties()) {
db.metadata(p.getName(), p.getValue().asString());
}
db.metadata("gitstatus", getGitStatus());
}

data.add("totalFiles", fileList.size());
data.add("processedFiles", changeList.size());

if (repoSource != null) {
data.add("repoSource", gh());
} else {
Expand All @@ -10915,13 +10925,7 @@ private void generateDataFile(DBBuilder db) throws IOException, FHIRException, S
data.add("repoSource", git);
}
}
data.add("genDate", genTime());
data.add("genDay", genDate());
if (db != null) {
for (JsonProperty p : data.getProperties()) {
db.metadata(p.getName(), p.getValue().asString());
}
}

JsonArray rt = data.forceArray("resourceTypes");
List<String> rtl = context.getResourceNames();
for (String s : rtl) {
Expand All @@ -10947,9 +10951,7 @@ private void generateDataFile(DBBuilder db) throws IOException, FHIRException, S
ig.add("experimental", publishedIg.getExperimental());
ig.add("publisher", publishedIg.getPublisher());
addTranslationsToJson(ig, "publisher", publishedIg.getPublisherElement(), false);
if (db != null) {
db.metadata("gitstatus", getGitStatus());
}

if (previousVersionComparator != null && previousVersionComparator.hasLast() && !targetUrl().startsWith("file:")) {
JsonObject diff = new JsonObject();
data.add("diff", diff);
Expand Down

0 comments on commit d968694

Please sign in to comment.