Skip to content

Commit 9eb38b5

Browse files
authored
fail builds if compiles fail (#42)
1 parent ee73b8f commit 9eb38b5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

build.savant

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2024, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ target(name: "clean", description: "Cleans the build directory") {
5050
target(name: "compile", description: "Builds archives of the source and compiled versions of the code.", dependsOn: ["setup-python"]) {
5151
def proc = "python3 setup.py sdist bdist_wheel".execute()
5252
proc.consumeProcessOutput(System.out, System.err)
53-
proc.waitFor()
53+
assert proc.waitFor() == 0
5454
}
5555

5656
target(name: "int", description: "Releases a local integration build of the project", dependsOn: ["compile"]) {
@@ -78,11 +78,11 @@ target(name: "test", description: "Runs the project's tests", dependsOn: ["compi
7878
target(name: "setup-python", description: "Gets the python dependencies") {
7979
def proc1 = "python3 -m pip install --user --upgrade setuptools".execute()
8080
proc1.consumeProcessOutput(System.out, System.err)
81-
proc1.waitFor()
81+
assert proc1.waitFor() == 0
8282

8383
def proc2 = "python3 -m pip install --user --upgrade wheel twine requests deprecated".execute()
8484
proc2.consumeProcessOutput(System.out, System.err)
85-
proc2.waitFor()
85+
assert proc2.waitFor() == 0
8686
}
8787

8888
/**
@@ -104,8 +104,7 @@ target(name: "publish", description: "Publishes source and built versions of the
104104

105105
def process = pb.start()
106106
process.consumeProcessOutput(System.out, System.err)
107-
process.waitFor()
108-
return process.exitValue() == 0
107+
assert process.waitFor() == 0
109108
}
110109

111110
target(name: "release", description: "Releases a full version of the project", dependsOn: ["int"]) {

0 commit comments

Comments
 (0)