From c91c80c63f0c64c113b8e8ac6555be856503514b Mon Sep 17 00:00:00 2001 From: xenia Date: Tue, 15 Aug 2023 12:23:55 +0200 Subject: [PATCH] run command, cd in build and clean --- buildScripts/setupEnv.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/buildScripts/setupEnv.sh b/buildScripts/setupEnv.sh index 23642ee..7a76989 100644 --- a/buildScripts/setupEnv.sh +++ b/buildScripts/setupEnv.sh @@ -50,12 +50,26 @@ setupDb() { P="$PWD" clean() { + cd "$(git rev-parse --show-toplevel)" log "Rensar byggnad" rm -rf artifacts + cd - >/dev/null } build() { - source "$P/buildScripts/build.sh" + cd "$(git rev-parse --show-toplevel)" + ( source "buildScripts/build.sh" ) + RES=$? + cd - >/dev/null + return $RES +} + +run() { + build && { + cd "$(git rev-parse --show-toplevel)" + ./artifacts/Main + cd - >/dev/null + } } if [ "$IS_OWNER" -ne 0 ] ; then @@ -68,4 +82,4 @@ log "Redo" "!" set +e -cd - >/dev/null 2>&1 +cd - >/dev/null