Skip to content

Commit

Permalink
Clarify validating logic with explicit variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Latylus committed Mar 15, 2024
1 parent 43ae1b4 commit b0b507a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/model/platform-validation/validate-windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
Expand Down

0 comments on commit b0b507a

Please sign in to comment.