Skip to content

Commit

Permalink
support new version file format from alauncher
Browse files Browse the repository at this point in the history
  • Loading branch information
chuemb committed Sep 16, 2016
1 parent 72cba25 commit 829483e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/absint/a3/A3Builder.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void perform(Run<?,?> build, FilePath workspace, Launcher launcher, TaskL
/* Small Helper: Extracts Build Number in long from a string line ending with the build number */
private long extractBuildNumber(String n) {
try {
String buildstrs[] = n.split(" ");
String buildstrs[] = n.split(":");
String buildstr = buildstrs[buildstrs.length-1];
return Integer.parseInt(buildstr);
} catch (ArrayIndexOutOfBoundsException | NumberFormatException e) {
Expand All @@ -338,8 +338,9 @@ private boolean checkA3Compatibility(String required_a3version, File a3versionFi
BufferedReader br = new BufferedReader(
new InputStreamReader(
new FileInputStream(a3versionFileInfo), "UTF-8" ));

String a3buildLine = br.readLine(); // read first line, looks like this: "This is a3 build 123456"

for (int i=0; i < 2; i++) { br.readLine(); } // ignore the first 2 lines in version file
String a3buildLine = br.readLine(); // read third line, looks like this: "This is a3 build 123456"
br.close();

if (a3buildLine == null) return false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/absint/a3/XMLResultFileHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static class XMLResultFileException extends Exception {
private Document xmldoc;
private File inputXMLFile;

public static final String required_a3version = "16.04i Build 267329";
public static final String required_a3version = "Build: 268897";

/**
* Constructor
Expand Down

0 comments on commit 829483e

Please sign in to comment.