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

Commit d98357b

Browse files
committed
Move constant to top of file
1 parent ccf90c3 commit d98357b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

run-build-functions.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export GIMME_CGO_ENABLED=true
1717

1818
export NVM_DIR="$HOME/.nvm"
1919
export RVM_DIR="$HOME/.rvm"
20+
21+
# Swift configuration
2022
export SWIFTENV_ROOT="${SWIFTENV_ROOT:-${HOME}/.swiftenv}"
23+
DEFAULT_SWIFT_VERSION="5.2"
2124

2225
# Pipenv configuration
2326
export PIPENV_RUNTIME=2.7
@@ -407,7 +410,6 @@ install_dependencies() {
407410
fi
408411

409412
# Swift Version
410-
defaultSwiftVersion="5.2"
411413
if [ -f .swift-version ]
412414
then
413415
SWIFT_VERSION=$(cat .swift-version)
@@ -417,7 +419,7 @@ install_dependencies() {
417419
# If Package.swift is present and no Swift version is set, use a default
418420
if [ -f Package.swift ]
419421
then
420-
: ${SWIFT_VERSION="$defaultSwiftVersion"}
422+
: ${SWIFT_VERSION="$DEFAULT_SWIFT_VERSION"}
421423
fi
422424

423425
if [ -n "$SWIFT_VERSION" ]

0 commit comments

Comments
 (0)