mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-04 08:09:08 +08:00
Add input to set version code
Use action input `androidVersionCode` when provided. Generate the androidVersionCode from the version otherwise.
This commit is contained in:
committed by
Webber Takken
parent
401ddcaae0
commit
bdc3a88d22
@@ -118,6 +118,19 @@ describe('Input', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('androidVersionCode', () => {
|
||||
it('defaults to null', () => {
|
||||
expect(Input.androidVersionCode).toBeFalsy();
|
||||
});
|
||||
|
||||
it('takes input from the users workflow', () => {
|
||||
const mockValue = '42';
|
||||
const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue);
|
||||
expect(Input.androidVersionCode).toStrictEqual(mockValue);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('allowDirtyBuild', () => {
|
||||
it('returns the default value', () => {
|
||||
expect(Input.allowDirtyBuild).toStrictEqual('false');
|
||||
|
||||
Reference in New Issue
Block a user