mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Force module install
This commit is contained in:
parent
f2250e958e
commit
5db0bb54c2
BIN
dist/.DS_Store
vendored
BIN
dist/.DS_Store
vendored
Binary file not shown.
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.
@ -20,6 +20,8 @@ class SetupMac {
|
||||
await SetupMac.installUnity(buildParameters);
|
||||
}
|
||||
|
||||
await SetupMac.ensureRequiredModuleIsInstalled(buildParameters);
|
||||
|
||||
await SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
||||
}
|
||||
|
||||
@ -119,6 +121,26 @@ class SetupMac {
|
||||
return moduleArgument;
|
||||
}
|
||||
|
||||
private static async ensureRequiredModuleIsInstalled(buildParameters: BuildParameters) {
|
||||
const unityChangeset = await getUnityChangeset(buildParameters.editorVersion);
|
||||
const moduleArguments = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);
|
||||
|
||||
const execArguments: string[] = [
|
||||
'--',
|
||||
'--headless',
|
||||
'install-modules',
|
||||
...['--version', buildParameters.editorVersion],
|
||||
...['--changeset', unityChangeset.changeset],
|
||||
...moduleArguments,
|
||||
'--childModules',
|
||||
];
|
||||
|
||||
await exec(this.unityHubExecPath, execArguments, {
|
||||
silent: true,
|
||||
ignoreReturnCode: true,
|
||||
});
|
||||
}
|
||||
|
||||
private static async installUnity(buildParameters: BuildParameters, silent = false) {
|
||||
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}`;
|
||||
const key = `Cache-MacOS-UnityEditor-With-Module-${buildParameters.targetPlatform}@${buildParameters.editorVersion}`;
|
||||
|
Loading…
Reference in New Issue
Block a user