Skip to content

Commit 70d5bdc

Browse files
committed
feat: support private scoped registries
1 parent 5777262 commit 70d5bdc

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/platforms/ubuntu/run_tests.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,22 @@ if [ "$PACKAGE_MODE" = "true" ]; then
108108
> "$PACKAGE_MANIFEST_PATH"
109109

110110
UNITY_PROJECT_PATH="$TEMP_PROJECT_PATH"
111+
112+
if [ -n "$PRIVATE_REGISTRY_TOKEN" ]; then
113+
echo "Private registry token detected, creating .upmconfig.toml"
114+
115+
UPM_CONFIG_TOML_PATH="$HOME/.upmconfig.toml"
116+
echo "Creating toml at path: $UPM_CONFIG_TOML_PATH"
117+
118+
touch $UPM_CONFIG_TOML_PATH
119+
120+
cat > "$UPM_CONFIG_TOML_PATH" <<EOF
121+
[npmAuth."$SCOPED_REGISTRY_URL"]
122+
token = "$PRIVATE_REGISTRY_TOKEN"
123+
alwaysAuth = true
124+
EOF
125+
fi
126+
111127
fi
112128

113129

src/model/image-environment-factory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ImageEnvironmentFactory {
4040
{ name: 'PACKAGE_NAME', value: parameters.packageName },
4141
{ name: 'SCOPED_REGISTRY_URL', value: parameters.scopedRegistryUrl },
4242
{ name: 'REGISTRY_SCOPES', value: parameters.registryScopes },
43+
{ name: 'PRIVATE_REGISTRY_TOKEN', value: process.env.UPM_REGISTRY_TOKEN },
4344
{ name: 'GIT_PRIVATE_TOKEN', value: parameters.gitPrivateToken },
4445
{ name: 'VERSION', value: parameters.buildVersion },
4546
{ name: 'CUSTOM_PARAMETERS', value: parameters.customParameters },

0 commit comments

Comments
 (0)