Split responsibilities between Input and BuildParameters models
This commit is contained in:
@@ -1,28 +1,25 @@
|
||||
import Input from './input';
|
||||
import Platform from './platform';
|
||||
import Versioning from './versioning';
|
||||
|
||||
class BuildParameters {
|
||||
static create(parameters) {
|
||||
const {
|
||||
version,
|
||||
targetPlatform,
|
||||
projectPath,
|
||||
buildName,
|
||||
buildsPath,
|
||||
buildMethod,
|
||||
buildVersion,
|
||||
customParameters,
|
||||
} = parameters;
|
||||
static async create() {
|
||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform);
|
||||
const buildVersion = await Versioning.determineVersion(
|
||||
Input.versioningStrategy,
|
||||
Input.specifiedVersion,
|
||||
);
|
||||
|
||||
return {
|
||||
version,
|
||||
platform: targetPlatform,
|
||||
projectPath,
|
||||
buildName,
|
||||
buildPath: `${buildsPath}/${targetPlatform}`,
|
||||
buildFile: this.parseBuildFile(buildName, targetPlatform),
|
||||
buildMethod,
|
||||
version: Input.unityVersion,
|
||||
platform: Input.targetPlatform,
|
||||
projectPath: Input.projectPath,
|
||||
buildName: Input.buildName,
|
||||
buildPath: `${Input.buildsPath}/${Input.targetPlatform}`,
|
||||
buildFile,
|
||||
buildMethod: Input.buildMethod,
|
||||
buildVersion,
|
||||
customParameters,
|
||||
customParameters: Input.customParameters,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user