Skip to content

Commit a98236c

Browse files
authored
rename platform env variable (#75)
1 parent 7c70150 commit a98236c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package-testing/sdk-test-runner/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The following components are required to use the the package test runner with a
9595
1. OR, an **SDK relay client**. This is a client application that connects to the SDK test runner via `socket.io` and responses to [Assignment requests](#sdk-relay-client)
9696
2. Launch Script:
9797
1. A `build-and-run-<platform>.sh` file which fully configures the environment then initiates a [build and run of the relay server application](#build-and-runsh) **using the specified version of the SDK package**. <platform> is one of `linux`, `macos`, or `windows`.
98-
2. OR, a `build-and-run.sh` file which can configure the environment based on the env variable, `PLATFORM` and then initiate a [build and run of the relay server application](#build-and-runsh) **using the specified version of the SDK package**.
98+
2. OR, a `build-and-run.sh` file which can configure the environment based on the env variable, `EPPO_SDK_PLATFORM` and then initiate a [build and run of the relay server application](#build-and-runsh) **using the specified version of the SDK package**.
9999
3. OR, a `docker-run.sh` file which builds and runs a docker container running the SDK relay app
100100

101101
The following are key components derived from above which allow for convenient and consistent dev-ops.
@@ -282,7 +282,7 @@ Example `build-and-run.sh` script
282282
#!/usr/bin/env bash
283283

284284
# Configure environment per platform
285-
case "${PLATFORM}" in
285+
case "${EPPO_SDK_PLATFORM}" in
286286
"windows")
287287
choco install php -v ${PHP_VERSION}
288288
;;
@@ -294,7 +294,7 @@ case "${PLATFORM}" in
294294
sudo apt install php-${PHP_VERSION}
295295
;;
296296
*)
297-
echo "Unsupported platform: ${PLATFORM}"
297+
echo "Unsupported platform: ${EPPO_SDK_PLATFORM}"
298298
exit 1
299299
;;
300300
esac

package-testing/sdk-test-runner/test-sdk.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ if [[ -z "$SDK_NAME" ]]; then
7676
fi
7777

7878
# Ensure platform is set
79-
if [[ -z "$PLATFORM" ]]; then
80-
exit_with_message "PLATFORM environment variable must be set"
79+
if [[ -z "$EPPO_SDK_PLATFORM" ]]; then
80+
exit_with_message "EPPO_SDK_PLATFORM environment variable must be set"
8181
fi
82-
export PLATFORM
82+
export EPPO_SDK_PLATFORM
8383

8484
# Extrapolate the SDK directory name
8585
if [[ -z "$SDK_DIR" ]]; then
@@ -134,7 +134,7 @@ case "$command" in
134134
mkdir -p ${RUNNER_DIR}/logs
135135
pushd ../$SDK_DIR
136136

137-
BUILD_AND_RUN_PLATFORM=build-and-run-${PLATFORM}.sh
137+
BUILD_AND_RUN_PLATFORM=build-and-run-${EPPO_SDK_PLATFORM}.sh
138138
if [ -f docker-run.sh ]; then
139139
echo " ... Starting SDK Relay via docker launch script"
140140
./docker-run.sh >> ${RUNNER_DIR}/logs/sdk.log 2>&1 &

0 commit comments

Comments
 (0)