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