Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally allow SKC checkout to persist #41

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions functions
Original file line number Diff line number Diff line change
@@ -595,11 +595,14 @@ function install_kayobe_venv {
function create_kayobe_environment {
local env=$1
local kayobe_config_source_path=${2:-$KAYOBE_CONFIG_SOURCE_PATH}
local allow_unclean_kayobe_config=${KAYOBE_AUTOMATION_ALLOW_UNCLEAN_KAYOBE_CONFIG:-0}
mkdir -p "$env"/{src/kayobe,src/kayobe-config,venvs/kayobe}

# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
if [ "$allow_unclean_kayobe_config" != 0 ]; then
# Ensure we have an unmodified copy of kayobe-config
if [[ $(realpath "$kayobe_config_source_path") != $(realpath "$env/src/kayobe-config") ]]; then
clean_copy "$kayobe_config_source_path" "$env/src/kayobe-config"
fi
fi

if [ -f "$kayobe_config_source_path/requirements.txt" ]; then