diff --git a/scripts/setup_workspace.sh b/scripts/setup_workspace.sh index a649531..6dcb439 100755 --- a/scripts/setup_workspace.sh +++ b/scripts/setup_workspace.sh @@ -5,21 +5,16 @@ set -euo pipefail THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}") THIS_DIR=$(dirname "$THIS_FILE") ROOT_DIR=$(dirname "$THIS_DIR") +WORKSPACE_DIR="$(dirname "$ROOT_DIR")" . "$THIS_DIR/kash/kash.sh" ## Parse options ## -WORKSPACE_BRANCH= -WORKSPACE_TAG= - begin_group "Setting up workspace ..." -if [ "$CI" = true ]; then - WORKSPACE_DIR="$(dirname "$ROOT_DIR")" - DEVELOPMENT_REPO_URL="https://$GITHUB_DEVELOPMENT_PAT@github.com/kalisio/development.git" -else +if [ "$CI" != true ]; then while getopts "b:t" option; do case $option in b) # defines branch @@ -30,14 +25,12 @@ else ;; esac done + shift $((OPTIND-1)) WORKSPACE_DIR="$1" # Clone project in the workspace git_shallow_clone "$KALISIO_GITHUB_URL/weacast/weacast-app.git" "$WORKSPACE_DIR/weacast-app" "${WORKSPACE_TAG:-${WORKSPACE_BRANCH:-}}" - - # unset KALISIO_DEVELOPMENT_DIR because we want kli to clone everyhting in $WORKSPACE_DIR - unset KALISIO_DEVELOPMENT_DIR fi setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git"