fix
parent
ffa0432a0b
commit
452b48881d
|
|
@ -3184,11 +3184,12 @@ exports.default = ValidationError;
|
|||
/***/ }),
|
||||
|
||||
/***/ 25145:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
const test_license_reader_1 = __webpack_require__(13963);
|
||||
class Parameter {
|
||||
}
|
||||
class ImageEnvironmentFactory {
|
||||
|
|
@ -3210,7 +3211,7 @@ class ImageEnvironmentFactory {
|
|||
static getEnvironmentVariables(parameters) {
|
||||
const { version, platform, projectPath, buildName, buildPath, buildFile, buildMethod, buildVersion, androidVersionCode, androidKeystoreName, androidKeystoreBase64, androidKeystorePass, androidKeyaliasName, androidKeyaliasPass, customParameters, sshAgent, chownFilesTo, } = parameters;
|
||||
const environmentVariables = [
|
||||
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE },
|
||||
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() },
|
||||
{ name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },
|
||||
{ name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },
|
||||
{ name: 'UNITY_PASSWORD', value: process.env.UNITY_PASSWORD },
|
||||
|
|
@ -3524,6 +3525,28 @@ class GithubCliReader {
|
|||
exports.GithubCliReader = GithubCliReader;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 13963:
|
||||
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ReadLicense = void 0;
|
||||
const path_1 = __importDefault(__webpack_require__(85622));
|
||||
const fs_1 = __importDefault(__webpack_require__(35747));
|
||||
const yaml_1 = __importDefault(__webpack_require__(13552));
|
||||
function ReadLicense() {
|
||||
const pipelineFile = path_1.default.join(__dirname, `.github`, `workflows`, `cloud-runner-k8s-pipeline.yml`);
|
||||
return fs_1.default.existsSync(pipelineFile) ? yaml_1.default.parse(fs_1.default.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : '';
|
||||
}
|
||||
exports.ReadLicense = ReadLicense;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 91933:
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,5 @@
|
|||
import { ReadLicense } from './input-readers/test-license-reader';
|
||||
|
||||
class Parameter {
|
||||
public name;
|
||||
public value;
|
||||
|
|
@ -41,7 +43,7 @@ class ImageEnvironmentFactory {
|
|||
} = parameters;
|
||||
|
||||
const environmentVariables: Parameter[] = [
|
||||
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE },
|
||||
{ name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || ReadLicense() },
|
||||
{ name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },
|
||||
{ name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },
|
||||
{ name: 'UNITY_PASSWORD', value: process.env.UNITY_PASSWORD },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import YAML from 'yaml';
|
||||
|
||||
export function ReadLicense() {
|
||||
const pipelineFile = path.join(__dirname, `.github`, `workflows`, `cloud-runner-k8s-pipeline.yml`);
|
||||
return fs.existsSync(pipelineFile) ? YAML.parse(fs.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : '';
|
||||
}
|
||||
Loading…
Reference in New Issue