get current core pacakge from current build
This commit is contained in:
parent
47d8ba4558
commit
12b0046ebc
|
@ -257,7 +257,15 @@ public class PackageCacheManager {
|
||||||
for (File f : new File(cacheFolder).listFiles()) {
|
for (File f : new File(cacheFolder).listFiles()) {
|
||||||
if (f.isDirectory()) {
|
if (f.isDirectory()) {
|
||||||
Utilities.clearDirectory(f.getAbsolutePath());
|
Utilities.clearDirectory(f.getAbsolutePath());
|
||||||
|
try {
|
||||||
FileUtils.deleteDirectory(f);
|
FileUtils.deleteDirectory(f);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
try {
|
||||||
|
FileUtils.deleteDirectory(f);
|
||||||
|
} catch (Exception e2) {
|
||||||
|
// just give up
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (!f.getName().equals("packages.ini"))
|
else if (!f.getName().equals("packages.ini"))
|
||||||
FileUtils.forceDelete(f);
|
FileUtils.forceDelete(f);
|
||||||
|
@ -652,8 +660,8 @@ public class PackageCacheManager {
|
||||||
InputStream stream = fetchFromUrlSpecific(Utilities.pathURL(ciList.get(id), "package.tgz"), false);
|
InputStream stream = fetchFromUrlSpecific(Utilities.pathURL(ciList.get(id), "package.tgz"), false);
|
||||||
return new InputStreamWithSrc(stream, Utilities.pathURL(ciList.get(id), "package.tgz"), "current");
|
return new InputStreamWithSrc(stream, Utilities.pathURL(ciList.get(id), "package.tgz"), "current");
|
||||||
} else if (id.startsWith("hl7.fhir.r5")) {
|
} else if (id.startsWith("hl7.fhir.r5")) {
|
||||||
InputStream stream = fetchFromUrlSpecific(Utilities.pathURL("http://hl7.org/fhir/2020Feb", id+".tgz"), false);
|
InputStream stream = fetchFromUrlSpecific(Utilities.pathURL("http://build.fhir.org", id+".tgz"), false);
|
||||||
return new InputStreamWithSrc(stream, Utilities.pathURL("http://hl7.org/fhir/2020Feb", id+".tgz"), "current");
|
return new InputStreamWithSrc(stream, Utilities.pathURL("http://build.fhir.org", id+".tgz"), "current");
|
||||||
} else {
|
} else {
|
||||||
throw new FHIRException("The package '"+id+"' has not entry on the current build server");
|
throw new FHIRException("The package '"+id+"' has not entry on the current build server");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue