mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Revert nullish coalescing operator
This commit is contained in:
parent
08255b9bb8
commit
ae7ec67e88
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.
@ -170,7 +170,7 @@ class BuildParameters {
|
|||||||
customParameters: Input.customParameters,
|
customParameters: Input.customParameters,
|
||||||
sshAgent: Input.sshAgent,
|
sshAgent: Input.sshAgent,
|
||||||
sshPublicKeysDirectoryPath: Input.sshPublicKeysDirectoryPath,
|
sshPublicKeysDirectoryPath: Input.sshPublicKeysDirectoryPath,
|
||||||
gitPrivateToken: Input.gitPrivateToken ?? (await GithubCliReader.GetGitHubAuthToken()),
|
gitPrivateToken: Input.gitPrivateToken || (await GithubCliReader.GetGitHubAuthToken()),
|
||||||
runAsHostUser: Input.runAsHostUser,
|
runAsHostUser: Input.runAsHostUser,
|
||||||
chownFilesTo: Input.chownFilesTo,
|
chownFilesTo: Input.chownFilesTo,
|
||||||
dockerCpuLimit: Input.dockerCpuLimit,
|
dockerCpuLimit: Input.dockerCpuLimit,
|
||||||
@ -192,7 +192,7 @@ class BuildParameters {
|
|||||||
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
||||||
cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0],
|
cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0],
|
||||||
cloudRunnerDebug: CloudRunnerOptions.cloudRunnerDebug,
|
cloudRunnerDebug: CloudRunnerOptions.cloudRunnerDebug,
|
||||||
githubRepo: (Input.githubRepo ?? (await GitRepoReader.GetRemote())) || 'game-ci/unity-builder',
|
githubRepo: Input.githubRepo || (await GitRepoReader.GetRemote()) || 'game-ci/unity-builder',
|
||||||
isCliMode: Cli.isCliMode,
|
isCliMode: Cli.isCliMode,
|
||||||
awsStackName: CloudRunnerOptions.awsStackName,
|
awsStackName: CloudRunnerOptions.awsStackName,
|
||||||
gitSha: Input.gitSha,
|
gitSha: Input.gitSha,
|
||||||
|
@ -186,7 +186,7 @@ class Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get sshPublicKeysDirectoryPath(): string {
|
static get sshPublicKeysDirectoryPath(): string {
|
||||||
return Input.getInput('sshPublicKeysDirectoryPath') ?? '';
|
return Input.getInput('sshPublicKeysDirectoryPath') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get gitPrivateToken(): string | undefined {
|
static get gitPrivateToken(): string | undefined {
|
||||||
@ -194,27 +194,27 @@ class Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get runAsHostUser(): string {
|
static get runAsHostUser(): string {
|
||||||
return Input.getInput('runAsHostUser')?.toLowerCase() ?? 'false';
|
return Input.getInput('runAsHostUser')?.toLowerCase() || 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get chownFilesTo() {
|
static get chownFilesTo() {
|
||||||
return Input.getInput('chownFilesTo') ?? '';
|
return Input.getInput('chownFilesTo') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get allowDirtyBuild(): boolean {
|
static get allowDirtyBuild(): boolean {
|
||||||
const input = Input.getInput('allowDirtyBuild') ?? false;
|
const input = Input.getInput('allowDirtyBuild') || false;
|
||||||
|
|
||||||
return input === 'true';
|
return input === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get cacheUnityInstallationOnMac(): boolean {
|
static get cacheUnityInstallationOnMac(): boolean {
|
||||||
const input = Input.getInput('cacheUnityInstallationOnMac') ?? false;
|
const input = Input.getInput('cacheUnityInstallationOnMac') || false;
|
||||||
|
|
||||||
return input === 'true';
|
return input === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get unityHubVersionOnMac(): string {
|
static get unityHubVersionOnMac(): string {
|
||||||
const input = Input.getInput('unityHubVersionOnMac') ?? '';
|
const input = Input.getInput('unityHubVersionOnMac') || '';
|
||||||
|
|
||||||
return input !== '' ? input : '';
|
return input !== '' ? input : '';
|
||||||
}
|
}
|
||||||
@ -228,11 +228,11 @@ class Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get dockerWorkspacePath(): string {
|
static get dockerWorkspacePath(): string {
|
||||||
return Input.getInput('dockerWorkspacePath') ?? '/github/workspace';
|
return Input.getInput('dockerWorkspacePath') || '/github/workspace';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get dockerCpuLimit(): string {
|
static get dockerCpuLimit(): string {
|
||||||
return Input.getInput('dockerCpuLimit') ?? os.cpus().length.toString();
|
return Input.getInput('dockerCpuLimit') || os.cpus().length.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static get dockerMemoryLimit(): string {
|
static get dockerMemoryLimit(): string {
|
||||||
@ -252,24 +252,24 @@ class Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
Input.getInput('dockerMemoryLimit') ?? `${Math.floor((os.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`
|
Input.getInput('dockerMemoryLimit') || `${Math.floor((os.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static get dockerIsolationMode(): string {
|
static get dockerIsolationMode(): string {
|
||||||
return Input.getInput('dockerIsolationMode') ?? 'default';
|
return Input.getInput('dockerIsolationMode') || 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get containerRegistryRepository(): string {
|
static get containerRegistryRepository(): string {
|
||||||
return Input.getInput('containerRegistryRepository') ?? 'unityci/editor';
|
return Input.getInput('containerRegistryRepository') || 'unityci/editor';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get containerRegistryImageVersion(): string {
|
static get containerRegistryImageVersion(): string {
|
||||||
return Input.getInput('containerRegistryImageVersion') ?? '3';
|
return Input.getInput('containerRegistryImageVersion') || '3';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get skipActivation(): string {
|
static get skipActivation(): string {
|
||||||
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
|
return Input.getInput('skipActivation')?.toLowerCase() || 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ToEnvVarFormat(input: string) {
|
public static ToEnvVarFormat(input: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user