Skip to content

Commit

Permalink
moved pre-build test models to github as a release
Browse files Browse the repository at this point in the history
  • Loading branch information
lausdahl committed Apr 11, 2024
1 parent 692dd63 commit 85486cf
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class OnlineTestUtils {

public final static String baseDownloadUrl = "https://overture.au.dk/into-cps/examples/public-coe-test-fmus/latest/";
public final static String baseDownloadUrl = "https://github.com/INTO-CPS-Association/maestro/releases/download/OnlineTestModels/";
final static String prefix = "/online-models";

public static void download(List<URL> urls) throws IOException {
Expand All @@ -27,8 +27,11 @@ public static void download(List<URL> urls) throws IOException {
file = file.substring(file.lastIndexOf('/') + 1);
File destination = new File("target/online-cache/" + file);
if (!destination.exists()) {
System.out.println("Downloading: " + url + " as: " + destination);
FileUtils.copyURLToFile(url, destination);

URL zipNameUrl =new URL( url.toString().replace(".fmu",".zip"));

System.out.println("Downloading: " + zipNameUrl + " as: " + destination);
FileUtils.copyURLToFile(zipNameUrl, destination);
} else {
System.out.println("Skipped - Downloading: " + url + " as: " + destination);
}
Expand Down

0 comments on commit 85486cf

Please sign in to comment.