diff --git a/dist/index.js b/dist/index.js index 9846f22a..9c38ab9a 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 62a551dd..ca610bdb 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/dist/platforms/ubuntu/steps/build.sh b/dist/platforms/ubuntu/steps/build.sh index 7bd719a2..a066e4ed 100755 --- a/dist/platforms/ubuntu/steps/build.sh +++ b/dist/platforms/ubuntu/steps/build.sh @@ -119,7 +119,7 @@ echo "" unity-editor \ -logfile /dev/stdout \ - $( [ -n "${MANUAL_EXIT+set}" ] || echo "-quit" ) \ + $( [ "${MANUAL_EXIT}" == "true" ] || echo "-quit" ) \ -customBuildName "$BUILD_NAME" \ -projectPath "$UNITY_PROJECT_PATH" \ -buildTarget "$BUILD_TARGET" \ diff --git a/src/model/build-parameters.ts b/src/model/build-parameters.ts index d3153fbb..bd5f9103 100644 --- a/src/model/build-parameters.ts +++ b/src/model/build-parameters.ts @@ -29,7 +29,7 @@ class BuildParameters { public buildFile!: string; public buildMethod!: string; public buildVersion!: string; - public manualExit!: string | undefined; + public manualExit!: boolean; public androidVersionCode!: string; public androidKeystoreName!: string; public androidKeystoreBase64!: string; diff --git a/src/model/input.test.ts b/src/model/input.test.ts index 992059e7..6a24264d 100644 --- a/src/model/input.test.ts +++ b/src/model/input.test.ts @@ -106,13 +106,18 @@ describe('Input', () => { describe('manualExit', () => { it('returns the default value', () => { - expect(Input.manualExit).toStrictEqual(undefined); + expect(Input.manualExit).toStrictEqual(false); }); - it('takes input from the users workflow', () => { - const mockValue = 'x'; - const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue); - expect(Input.manualExit).toStrictEqual(mockValue); + it('returns true when string true is passed', () => { + const spy = jest.spyOn(core, 'getInput').mockReturnValue('true'); + expect(Input.manualExit).toStrictEqual(true); + expect(spy).toHaveBeenCalledTimes(1); + }); + + it('returns false when string false is passed', () => { + const spy = jest.spyOn(core, 'getInput').mockReturnValue('false'); + expect(Input.manualExit).toStrictEqual(false); expect(spy).toHaveBeenCalledTimes(1); }); }); diff --git a/src/model/input.ts b/src/model/input.ts index 378ea1a3..f50b0633 100644 --- a/src/model/input.ts +++ b/src/model/input.ts @@ -126,8 +126,10 @@ class Input { return Input.getInput('buildMethod') || ''; // Processed in docker file } - static get manualExit(): string | undefined { - return Input.getInput('manualExit'); + static get manualExit(): boolean { + const input = Input.getInput('manualExit') || false; + + return input === 'true'; } static get customParameters(): string {