mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Clarify validating logic with explicit variables
This commit is contained in:
parent
5724777f70
commit
e7544d8753
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -4,7 +4,12 @@ import { BuildParameters } from '..';
|
|||||||
class ValidateWindows {
|
class ValidateWindows {
|
||||||
public static validate(buildParameters: BuildParameters) {
|
public static validate(buildParameters: BuildParameters) {
|
||||||
ValidateWindows.validateWindowsPlatformRequirements(buildParameters.targetPlatform);
|
ValidateWindows.validateWindowsPlatformRequirements(buildParameters.targetPlatform);
|
||||||
if (!((process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD) || buildParameters.unityLicensingServer)) {
|
|
||||||
|
const { unityLicensingServer } = buildParameters;
|
||||||
|
const hasLicensingCredentials = process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD;
|
||||||
|
const hasValidLicensingStrategy = hasLicensingCredentials || unityLicensingServer;
|
||||||
|
|
||||||
|
if (!hasValidLicensingStrategy) {
|
||||||
throw new Error(`Unity email and password or alternatively a Unity licensing server url must be set for
|
throw new Error(`Unity email and password or alternatively a Unity licensing server url must be set for
|
||||||
Windows based builds to authenticate the license. Make sure to set them inside UNITY_EMAIL
|
Windows based builds to authenticate the license. Make sure to set them inside UNITY_EMAIL
|
||||||
and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);
|
and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);
|
||||||
|
Loading…
Reference in New Issue
Block a user