From a742d69e7a7f0f5e922222ab0c7ce6c11a14c14d Mon Sep 17 00:00:00 2001 From: Nic van Dessel <51134175+nvandessel@users.noreply.github.com> Date: Fri, 31 May 2024 11:11:55 -0700 Subject: [PATCH] feat: support private scoped registry on ubuntu --- dist/platforms/ubuntu/run_tests.sh | 35 +++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/dist/platforms/ubuntu/run_tests.sh b/dist/platforms/ubuntu/run_tests.sh index e80e13cc..a4b6c574 100755 --- a/dist/platforms/ubuntu/run_tests.sh +++ b/dist/platforms/ubuntu/run_tests.sh @@ -36,6 +36,25 @@ echo "Using custom parameters $CUSTOM_PARAMETERS." echo "Using Unity version \"$UNITY_VERSION\" to test." +# +# Setup token for private package registry. +# + +if [ -n "$PRIVATE_REGISTRY_TOKEN" ]; then + echo "Private registry token detected, creating .upmconfig.toml" + + UPM_CONFIG_TOML_PATH="$HOME/.upmconfig.toml" + echo "Creating toml at path: $UPM_CONFIG_TOML_PATH" + + touch $UPM_CONFIG_TOML_PATH + + cat > "$UPM_CONFIG_TOML_PATH" < "$UPM_CONFIG_TOML_PATH" <