summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-09-29 11:28:06 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-11-20 13:19:55 +0000
commit0cedb5faf43da6fb8da0b6792b2a044a9361c02a (patch)
tree8758c75d0af02b4a59341a36e5008e59c3e2764b
parent0359b73306bebfd021546350575d7ec60ab16d26 (diff)
common: Provide pass/fail helpers
Sometimes we don't have a return code to check explicitly and we already know the pass/fail condition. Provide wrappers to the pass_fail() call to provide a clean way to report. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-xcommon.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/common.sh b/common.sh
index b279abc..34db981 100755
--- a/common.sh
+++ b/common.sh
@@ -98,6 +98,14 @@ pass_fail() {
return "$1"
}
+fail() {
+ pass_fail 1 "$@"
+}
+
+pass() {
+ pass_fail 0 "$@"
+}
+
completed() {
echo "$VERSION" > "$last_build"
}