unity-builder/src/model/input-readers/test-license-reader.ts

10 lines
322 B
TypeScript
Raw Normal View History

2022-02-01 02:31:20 +00:00
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`);
2022-02-01 02:31:20 +00:00
return fs.existsSync(pipelineFile) ? YAML.parse(fs.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : '';
}