Skip to content

Commit bd46fdd

Browse files
committed
Add support for user specified env vars
1 parent 112d6a2 commit bd46fdd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bin/compile.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ else
129129
status "No Aptfile found."
130130
fi
131131

132+
# ----------------------------------------------------------------------------- #
133+
# Set any user specified build environment variables. #
134+
# (Note, this is currently required in order to use Kitura with SwiftNIO.)
135+
# ----------------------------------------------------------------------------- #
136+
if [ -f $BUILD_DIR/.build_env ]; then
137+
status ".build_env found."
138+
for ENV_VAR in $(cat $BUILD_DIR/.build_env); do
139+
export $ENV_VAR
140+
status "Set build environment variable: $ENV_VAR"
141+
done
142+
fi
143+
132144
# ----------------------------------------------------------------------------- #
133145
# Install Swift dev tools & clang #
134146
# ----------------------------------------------------------------------------- #

0 commit comments

Comments
 (0)