Skip to content
This repository was archived by the owner on Mar 26, 2023. It is now read-only.

Clone swiftenv manually if .git folder has been removed. #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
13 changes: 10 additions & 3 deletions bin/steps/swiftenv
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Fetch swiftenv
unset GIT_DIR
git submodule update --init --recursive >/dev/null

# Activate swiftenv
unset GIT_DIR
export SWIFTENV_ROOT="$CACHE_DIR/swiftenv"
export PATH="$ROOT_DIR/swiftenv/bin:$PATH"

if [ -d ".git" ]; then
git submodule update --init --recursive >/dev/null
else
rm -rf $SWIFTENV_ROOT
git clone https://github.com/kylef/swiftenv.git $SWIFTENV_ROOT
fi

# Activate swiftenv
eval "$(swiftenv init -)"

if ! [ -f "$BUILD_DIR/.swift-version" ] && [ -z "$SWIFT_VERSION" ]; then
Expand Down