Clarify validating logic with explicit variables
parent
5724777f70
commit
e7544d8753
|
@ -7525,7 +7525,10 @@ const node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
|||
class ValidateWindows {
|
||||
static validate(buildParameters) {
|
||||
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
|
||||
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.`);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,12 @@ import { BuildParameters } from '..';
|
|||
class ValidateWindows {
|
||||
public static validate(buildParameters: BuildParameters) {
|
||||
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
|
||||
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.`);
|
||||
|
|
Loading…
Reference in New Issue