File tree Expand file tree Collapse file tree
migration-examples/src/main/groovy/com/quadient/migration/example/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,24 +17,19 @@ import static com.quadient.migration.example.common.util.InitMigration.initMigra
1717
1818def migration = initMigration(this . binding)
1919
20- try {
21- def documentObjects = PathUtil . dataDirPath(binding, " deploy" , " ${ migration.projectConfig.name} -document-objects" )
22- .toFile()
23- .text
24- .lines()
25- .toList()
26- log. info " Loaded ${ documentObjects.size()} document object IDs for conflict validation"
27-
28- def result = migration. deployClient. validateConflicts(documentObjects)
29-
30- if (result. hasNoConflicts()) {
31- log. info " No conflicts detected. Safe to deploy."
32- return
33- }
34-
35- ConflictsUtil . logConflictResult(result)
36- System . exit(1 )
37- } catch (Exception e) {
38- log. error " Validation failed with error: ${ e.message} "
39- System . exit(1 )
20+ def documentObjects = PathUtil . dataDirPath(binding, " deploy" , " ${ migration.projectConfig.name} -document-objects" )
21+ .toFile()
22+ .text
23+ .lines()
24+ .toList()
25+ log. info " Loaded ${ documentObjects.size()} document object IDs for conflict validation"
26+
27+ def result = migration. deployClient. validateConflicts(documentObjects)
28+
29+ if (result. hasNoConflicts()) {
30+ log. info " No conflicts detected. Safe to deploy."
31+ return
4032}
33+
34+ ConflictsUtil . logConflictResult(result)
35+ throw new RuntimeException (" Conflict validation failed, check logs for details" )
Original file line number Diff line number Diff line change @@ -16,17 +16,12 @@ import static com.quadient.migration.example.common.util.InitMigration.initMigra
1616
1717def migration = initMigration(this . binding)
1818
19- try {
20- def result = migration. deployClient. validateConflicts()
19+ def result = migration. deployClient. validateConflicts()
2120
22- if (result. hasNoConflicts()) {
23- log. info " No conflicts detected. Safe to deploy."
24- return
25- }
21+ if (result. hasNoConflicts()) {
22+ log. info " No conflicts detected. Safe to deploy."
23+ return
24+ }
2625
27- ConflictsUtil . logConflictResult(result)
28- System . exit(1 )
29- } catch (Exception e) {
30- log. error " Validation failed with error: ${ e.message} "
31- System . exit(1 )
32- }
26+ ConflictsUtil . logConflictResult(result)
27+ throw new RuntimeException (" Conflict validation failed, check logs for details" )
You can’t perform that action at this time.
0 commit comments