mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00

* fix: misalignments in dev lifecycle * fix: dist no longer added to staged * fix: misalignments in dev lifecycle * chore: multi-platform hooks and tests * chore: multi-platform hooks and tests * chore: add intention for colors * chore: update lint-staged to fix color * chore: update dist files * feat: move to lefthook (remove husky and lint-staged) * feat: move to lefthook (remove husky and lint-staged) * fix: test aftereach * fix: test aftereach * fix: early restore call * feat: jest fails if something gets logged to console * chore: add todos of misplaced code * chore: update dist files * chore: move jest file
23 lines
626 B
TypeScript
23 lines
626 B
TypeScript
import { assert } from 'console';
|
|
import System from '../system';
|
|
import fs from 'fs';
|
|
import { CloudRunnerSystem } from '../cli/remote-client/remote-client-services/cloud-runner-system';
|
|
|
|
export class GitRepoReader {
|
|
static GetSha() {
|
|
return '';
|
|
}
|
|
|
|
public static async GetRemote() {
|
|
return (await CloudRunnerSystem.Run(`git remote -v`))
|
|
.split(' ')[1]
|
|
.split('https://github.com/')[1]
|
|
.split('.git')[0];
|
|
}
|
|
|
|
public static async GetBranch() {
|
|
assert(fs.existsSync(`.git`));
|
|
return (await System.run(`git branch`, [], {}, false)).split('*')[1].split(`\n`)[0].replace(/ /g, ``);
|
|
}
|
|
}
|