Skip to content

Commit

Permalink
update to use proper platform detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Jul 17, 2024
1 parent 49d8f92 commit 93746eb
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions pongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ function globals {
IMAGE_BASE_PREFIX="kong-pongo-"
IMAGE_BASE_NAME=$IMAGE_BASE_PREFIX$PONGO_VERSION

# macOS or WSL working on a drvfs mount doesn't support named pipes or Unix Domain Socket
if [ "$(uname -s)" == "Darwin" ] || ! (rm -f .pongo_test.sock; mkfifo .pongo_test.sock) 2>/dev/null; then
rm -f .pongo_test.sock
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-nonlinux-extend.yml"
else
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-linux-extend.yml"
fi

IMAGE_BASE_NAME=kong-pongo-test

# the path where the plugin source is located, as seen from Pongo (this script)
KONG_TEST_PLUGIN_PATH=$(realpath .)

Expand Down Expand Up @@ -108,6 +98,13 @@ function globals {
export PONGO_PLATFORM="LINUX"
fi

# macOS or WSL working on a drvfs mount doesn't support named pipes or Unix Domain Socket
if [ "$PONGO_PLATFORM" == "LINUX" ]; then
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-linux-extend.yml"
else
DOCKER_COMPOSE_FILES="$DOCKER_COMPOSE_FILES -f ${LOCAL_PATH}/assets/docker-compose-nonlinux-extend.yml"
fi

# when running CI do we have the required secrets available? (used for EE only)
# secrets are unavailable for PR's from outside the organization (untrusted)
# can be set to "true" or "false", defaults to the Travis-CI setting
Expand Down

0 comments on commit 93746eb

Please sign in to comment.