diff --git a/dist/index.js b/dist/index.js index 3b8f2390..9c31a59c 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index c63f2a52..e2facfde 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/build-parameters.ts b/src/model/build-parameters.ts index 42c05915..30c4ba6a 100644 --- a/src/model/build-parameters.ts +++ b/src/model/build-parameters.ts @@ -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, diff --git a/src/model/input.ts b/src/model/input.ts index 5b00d383..3aba0200 100644 --- a/src/model/input.ts +++ b/src/model/input.ts @@ -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) {