Skip to content

Commit df27414

Browse files
committed
HBX-2995: Backport release automation to branch 5.6
- Modify file 'test/maven-plugin/src/it/noPropertiesFile/verify.groovy' to make sure it works as well on the CI runs Signed-off-by: Koen Aers <[email protected]>
1 parent 3b8b043 commit df27414

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

test/maven-plugin/src/it/noPropertiesFile/verify.groovy

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,26 @@ import java.io.*;
22

33
println "start verify.groovy"
44

5-
File entity = new File(basedir, "build.log")
5+
File buildLog = new File(basedir, "build.log")
6+
7+
if (!buildLog.isFile()) {
8+
9+
println "'" + buildLog.absolutePath + "' is not a file."
10+
11+
throw new FileNotFoundException("Could not find build log file: '" + buildLog + "'")
612

7-
if (!entity.isFile()) {
8-
9-
throw new FileNotFoundException("Could not find generated JPA Entity: " + entity)
10-
1113
} else {
12-
14+
15+
println "inspecting build log lines"
16+
1317
boolean found = false
14-
String searchString =
15-
"[INFO] Property file '" +
16-
basedir.absolutePath +
17-
"/src/main/resources/hibernate.properties' cannot be found, aborting..."
18-
entity.eachLine {
19-
line -> if (line.startsWith(searchString)) found = true
18+
String startString = "[INFO] Property file '"
19+
String endString = "src/main/resources/hibernate.properties' cannot be found, aborting..."
20+
buildLog.eachLine {
21+
line -> if (line.startsWith(startString) && line.endsWith(endString)) found = true
2022
}
2123
return found
22-
24+
2325
}
2426

2527

0 commit comments

Comments
 (0)