unity-builder/src/model/input.js
Webber 1d1f81c0bb Refactor models to allow for build parameters...
Build parameters have to be parsed because they can no longer be implicitly passed, as they need to be interpreted for detecting extensions.
2020-01-21 00:28:05 +01:00

27 lines
748 B
JavaScript

import Platform from './platform';
const core = require('@actions/core');
class Input {
static getFromUser() {
// Input variables specified in workflows using "with" prop.
const unityVersion = core.getInput('unityVersion');
const targetPlatform = core.getInput('targetPlatform') || Platform.default;
const projectPath = core.getInput('projectPath');
const buildName = core.getInput('buildName') || targetPlatform;
const buildsPath = core.getInput('buildsPath') || 'build';
const buildMethod = core.getInput('buildMethod'); // processed in docker file
return {
unityVersion,
targetPlatform,
projectPath,
buildName,
buildsPath,
buildMethod,
};
}
}
export default Input;