mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-10 07:53:52 -07:00
9d475434d3
* Rename "Cloud Runner" to "Orchestrator" across entire codebase Breaking change: All CloudRunner classes, options, environment variables, and action.yml inputs have been renamed to Orchestrator equivalents. - Renamed src/model/cloud-runner/ directory to src/model/orchestrator/ - Renamed all cloud-runner-* files to orchestrator-* - Renamed all CloudRunner* classes to Orchestrator* (15+ classes) - Renamed all cloudRunner* properties to orchestrator* equivalents - Renamed CLOUD_RUNNER_* env vars to ORCHESTRATOR_* - Updated action.yml [CloudRunner] markers to [Orchestrator] - Updated workflow files and package.json test scripts - Updated all runtime strings (cache paths, log messages, branch refs) - Rebuilt dist/index.js No backward compatibility layer is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove tracked log/temp files and add to .gitignore Remove $LOG_FILE and temp/job-log.txt debug artifacts that should not be in the repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { assert } from 'node:console';
|
|
import fs from 'node:fs';
|
|
import { OrchestratorSystem } from '../orchestrator/services/core/orchestrator-system';
|
|
import OrchestratorLogger from '../orchestrator/services/core/orchestrator-logger';
|
|
import OrchestratorOptions from '../orchestrator/options/orchestrator-options';
|
|
import Input from '../input';
|
|
|
|
export class GitRepoReader {
|
|
public static async GetRemote() {
|
|
if (OrchestratorOptions.providerStrategy === 'local') {
|
|
return '';
|
|
}
|
|
assert(fs.existsSync(`.git`));
|
|
const value = (await OrchestratorSystem.Run(`cd ${Input.projectPath} && git remote -v`, false, true)).replace(
|
|
/ /g,
|
|
``,
|
|
);
|
|
OrchestratorLogger.log(`value ${value}`);
|
|
assert(value.includes('github.com'));
|
|
|
|
return value.split('github.com')[1].split('.git')[0].slice(1);
|
|
}
|
|
|
|
public static async GetBranch() {
|
|
if (OrchestratorOptions.providerStrategy === 'local') {
|
|
return '';
|
|
}
|
|
assert(fs.existsSync(`.git`));
|
|
|
|
return (await OrchestratorSystem.Run(`cd ${Input.projectPath} && git branch --show-current`, false, true))
|
|
.split('\n')[0]
|
|
.replace(/ /g, ``)
|
|
.replace('/head', '');
|
|
}
|
|
}
|