Revert nullish coalescing operator
parent
08255b9bb8
commit
ae7ec67e88
|
@ -316,7 +316,7 @@ class BuildParameters {
|
|||
customParameters: input_1.default.customParameters,
|
||||
sshAgent: input_1.default.sshAgent,
|
||||
sshPublicKeysDirectoryPath: input_1.default.sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken: input_1.default.gitPrivateToken ?? (await github_cli_1.GithubCliReader.GetGitHubAuthToken()),
|
||||
gitPrivateToken: input_1.default.gitPrivateToken || (await github_cli_1.GithubCliReader.GetGitHubAuthToken()),
|
||||
runAsHostUser: input_1.default.runAsHostUser,
|
||||
chownFilesTo: input_1.default.chownFilesTo,
|
||||
dockerCpuLimit: input_1.default.dockerCpuLimit,
|
||||
|
@ -338,7 +338,7 @@ class BuildParameters {
|
|||
branch: input_1.default.branch.replace('/head', '') || (await git_repo_1.GitRepoReader.GetBranch()),
|
||||
cloudRunnerBranch: cloud_runner_options_1.default.cloudRunnerBranch.split('/').reverse()[0],
|
||||
cloudRunnerDebug: cloud_runner_options_1.default.cloudRunnerDebug,
|
||||
githubRepo: (input_1.default.githubRepo ?? (await git_repo_1.GitRepoReader.GetRemote())) || 'game-ci/unity-builder',
|
||||
githubRepo: input_1.default.githubRepo || (await git_repo_1.GitRepoReader.GetRemote()) || 'game-ci/unity-builder',
|
||||
isCliMode: cli_1.Cli.isCliMode,
|
||||
awsStackName: cloud_runner_options_1.default.awsStackName,
|
||||
gitSha: input_1.default.gitSha,
|
||||
|
@ -7019,27 +7019,27 @@ class Input {
|
|||
return Input.getInput('sshAgent') || '';
|
||||
}
|
||||
static get sshPublicKeysDirectoryPath() {
|
||||
return Input.getInput('sshPublicKeysDirectoryPath') ?? '';
|
||||
return Input.getInput('sshPublicKeysDirectoryPath') || '';
|
||||
}
|
||||
static get gitPrivateToken() {
|
||||
return Input.getInput('gitPrivateToken');
|
||||
}
|
||||
static get runAsHostUser() {
|
||||
return Input.getInput('runAsHostUser')?.toLowerCase() ?? 'false';
|
||||
return Input.getInput('runAsHostUser')?.toLowerCase() || 'false';
|
||||
}
|
||||
static get chownFilesTo() {
|
||||
return Input.getInput('chownFilesTo') ?? '';
|
||||
return Input.getInput('chownFilesTo') || '';
|
||||
}
|
||||
static get allowDirtyBuild() {
|
||||
const input = Input.getInput('allowDirtyBuild') ?? false;
|
||||
const input = Input.getInput('allowDirtyBuild') || false;
|
||||
return input === 'true';
|
||||
}
|
||||
static get cacheUnityInstallationOnMac() {
|
||||
const input = Input.getInput('cacheUnityInstallationOnMac') ?? false;
|
||||
const input = Input.getInput('cacheUnityInstallationOnMac') || false;
|
||||
return input === 'true';
|
||||
}
|
||||
static get unityHubVersionOnMac() {
|
||||
const input = Input.getInput('unityHubVersionOnMac') ?? '';
|
||||
const input = Input.getInput('unityHubVersionOnMac') || '';
|
||||
return input !== '' ? input : '';
|
||||
}
|
||||
static get unitySerial() {
|
||||
|
@ -7049,10 +7049,10 @@ class Input {
|
|||
return Input.getInput('UNITY_LICENSE');
|
||||
}
|
||||
static get dockerWorkspacePath() {
|
||||
return Input.getInput('dockerWorkspacePath') ?? '/github/workspace';
|
||||
return Input.getInput('dockerWorkspacePath') || '/github/workspace';
|
||||
}
|
||||
static get dockerCpuLimit() {
|
||||
return Input.getInput('dockerCpuLimit') ?? node_os_1.default.cpus().length.toString();
|
||||
return Input.getInput('dockerCpuLimit') || node_os_1.default.cpus().length.toString();
|
||||
}
|
||||
static get dockerMemoryLimit() {
|
||||
const bytesInMegabyte = 1024 * 1024;
|
||||
|
@ -7068,19 +7068,19 @@ class Input {
|
|||
memoryMultiplier = 0.75;
|
||||
break;
|
||||
}
|
||||
return (Input.getInput('dockerMemoryLimit') ?? `${Math.floor((node_os_1.default.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`);
|
||||
return (Input.getInput('dockerMemoryLimit') || `${Math.floor((node_os_1.default.totalmem() / bytesInMegabyte) * memoryMultiplier)}m`);
|
||||
}
|
||||
static get dockerIsolationMode() {
|
||||
return Input.getInput('dockerIsolationMode') ?? 'default';
|
||||
return Input.getInput('dockerIsolationMode') || 'default';
|
||||
}
|
||||
static get containerRegistryRepository() {
|
||||
return Input.getInput('containerRegistryRepository') ?? 'unityci/editor';
|
||||
return Input.getInput('containerRegistryRepository') || 'unityci/editor';
|
||||
}
|
||||
static get containerRegistryImageVersion() {
|
||||
return Input.getInput('containerRegistryImageVersion') ?? '3';
|
||||
return Input.getInput('containerRegistryImageVersion') || '3';
|
||||
}
|
||||
static get skipActivation() {
|
||||
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
|
||||
return Input.getInput('skipActivation')?.toLowerCase() || 'false';
|
||||
}
|
||||
static ToEnvVarFormat(input) {
|
||||
if (input.toUpperCase() === input) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -170,7 +170,7 @@ class BuildParameters {
|
|||
customParameters: Input.customParameters,
|
||||
sshAgent: Input.sshAgent,
|
||||
sshPublicKeysDirectoryPath: Input.sshPublicKeysDirectoryPath,
|
||||
gitPrivateToken: Input.gitPrivateToken ?? (await GithubCliReader.GetGitHubAuthToken()),
|
||||
gitPrivateToken: Input.gitPrivateToken || (await GithubCliReader.GetGitHubAuthToken()),
|
||||
runAsHostUser: Input.runAsHostUser,
|
||||
chownFilesTo: Input.chownFilesTo,
|
||||
dockerCpuLimit: Input.dockerCpuLimit,
|
||||
|
@ -192,7 +192,7 @@ class BuildParameters {
|
|||
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
||||
cloudRunnerBranch: CloudRunnerOptions.cloudRunnerBranch.split('/').reverse()[0],
|
||||
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,
|
||||
awsStackName: CloudRunnerOptions.awsStackName,
|
||||
gitSha: Input.gitSha,
|
||||
|
|
|
@ -186,7 +186,7 @@ class Input {
|
|||
}
|
||||
|
||||
static get sshPublicKeysDirectoryPath(): string {
|
||||
return Input.getInput('sshPublicKeysDirectoryPath') ?? '';
|
||||
return Input.getInput('sshPublicKeysDirectoryPath') || '';
|
||||
}
|
||||
|
||||
static get gitPrivateToken(): string | undefined {
|
||||
|
@ -194,27 +194,27 @@ class Input {
|
|||
}
|
||||
|
||||
static get runAsHostUser(): string {
|
||||
return Input.getInput('runAsHostUser')?.toLowerCase() ?? 'false';
|
||||
return Input.getInput('runAsHostUser')?.toLowerCase() || 'false';
|
||||
}
|
||||
|
||||
static get chownFilesTo() {
|
||||
return Input.getInput('chownFilesTo') ?? '';
|
||||
return Input.getInput('chownFilesTo') || '';
|
||||
}
|
||||
|
||||
static get allowDirtyBuild(): boolean {
|
||||
const input = Input.getInput('allowDirtyBuild') ?? false;
|
||||
const input = Input.getInput('allowDirtyBuild') || false;
|
||||
|
||||
return input === 'true';
|
||||
}
|
||||
|
||||
static get cacheUnityInstallationOnMac(): boolean {
|
||||
const input = Input.getInput('cacheUnityInstallationOnMac') ?? false;
|
||||
const input = Input.getInput('cacheUnityInstallationOnMac') || false;
|
||||
|
||||
return input === 'true';
|
||||
}
|
||||
|
||||
static get unityHubVersionOnMac(): string {
|
||||
const input = Input.getInput('unityHubVersionOnMac') ?? '';
|
||||
const input = Input.getInput('unityHubVersionOnMac') || '';
|
||||
|
||||
return input !== '' ? input : '';
|
||||
}
|
||||
|
@ -228,11 +228,11 @@ class Input {
|
|||
}
|
||||
|
||||
static get dockerWorkspacePath(): string {
|
||||
return Input.getInput('dockerWorkspacePath') ?? '/github/workspace';
|
||||
return Input.getInput('dockerWorkspacePath') || '/github/workspace';
|
||||
}
|
||||
|
||||
static get dockerCpuLimit(): string {
|
||||
return Input.getInput('dockerCpuLimit') ?? os.cpus().length.toString();
|
||||
return Input.getInput('dockerCpuLimit') || os.cpus().length.toString();
|
||||
}
|
||||
|
||||
static get dockerMemoryLimit(): string {
|
||||
|
@ -252,24 +252,24 @@ class Input {
|
|||
}
|
||||
|
||||
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 {
|
||||
return Input.getInput('dockerIsolationMode') ?? 'default';
|
||||
return Input.getInput('dockerIsolationMode') || 'default';
|
||||
}
|
||||
|
||||
static get containerRegistryRepository(): string {
|
||||
return Input.getInput('containerRegistryRepository') ?? 'unityci/editor';
|
||||
return Input.getInput('containerRegistryRepository') || 'unityci/editor';
|
||||
}
|
||||
|
||||
static get containerRegistryImageVersion(): string {
|
||||
return Input.getInput('containerRegistryImageVersion') ?? '3';
|
||||
return Input.getInput('containerRegistryImageVersion') || '3';
|
||||
}
|
||||
|
||||
static get skipActivation(): string {
|
||||
return Input.getInput('skipActivation')?.toLowerCase() ?? 'false';
|
||||
return Input.getInput('skipActivation')?.toLowerCase() || 'false';
|
||||
}
|
||||
|
||||
public static ToEnvVarFormat(input: string) {
|
||||
|
|
Loading…
Reference in New Issue