mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Refactor URL configuration in RemoteClient for token-based authentication
- Updated comments for clarity regarding the purpose of URL configuration changes. - Simplified the git configuration commands by removing redundant lines while maintaining functionality for HTTPS token-based authentication. - This change enhances the readability and maintainability of the RemoteClient class's git setup process.
This commit is contained in:
parent
9ed94b241f
commit
b662a6fa0e
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -236,16 +236,10 @@ export class RemoteClient {
|
|||||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||||
|
|
||||||
// Set new URL configuration with token
|
// Set new URL configuration with token for HTTPS
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "https://github.com/"`,
|
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "https://github.com/"`,
|
||||||
);
|
);
|
||||||
await CloudRunnerSystem.Run(
|
|
||||||
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "ssh://git@github.com/"`,
|
|
||||||
);
|
|
||||||
await CloudRunnerSystem.Run(
|
|
||||||
`git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "git@github.com"`,
|
|
||||||
);
|
|
||||||
|
|
||||||
await CloudRunnerSystem.Run(`git lfs pull`);
|
await CloudRunnerSystem.Run(`git lfs pull`);
|
||||||
RemoteClientLogger.log(`Successfully pulled LFS files with GIT_PRIVATE_TOKEN`);
|
RemoteClientLogger.log(`Successfully pulled LFS files with GIT_PRIVATE_TOKEN`);
|
||||||
@ -266,16 +260,10 @@ export class RemoteClient {
|
|||||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`);
|
||||||
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`);
|
||||||
|
|
||||||
// Set new URL configuration with token
|
// Set new URL configuration with token for HTTPS
|
||||||
await CloudRunnerSystem.Run(
|
await CloudRunnerSystem.Run(
|
||||||
`git config --global url."https://${githubToken}@github.com/".insteadOf "https://github.com/"`,
|
`git config --global url."https://${githubToken}@github.com/".insteadOf "https://github.com/"`,
|
||||||
);
|
);
|
||||||
await CloudRunnerSystem.Run(
|
|
||||||
`git config --global url."https://${githubToken}@github.com/".insteadOf "ssh://git@github.com/"`,
|
|
||||||
);
|
|
||||||
await CloudRunnerSystem.Run(
|
|
||||||
`git config --global url."https://${githubToken}@github.com/".insteadOf "git@github.com"`,
|
|
||||||
);
|
|
||||||
|
|
||||||
await CloudRunnerSystem.Run(`git lfs pull`);
|
await CloudRunnerSystem.Run(`git lfs pull`);
|
||||||
RemoteClientLogger.log(`Successfully pulled LFS files with GITHUB_TOKEN fallback`);
|
RemoteClientLogger.log(`Successfully pulled LFS files with GITHUB_TOKEN fallback`);
|
||||||
|
Loading…
Reference in New Issue
Block a user