pull/310/head
Frostebite 2021-12-25 20:14:55 +00:00
parent d25a814372
commit 52c2a66b7c
5 changed files with 9 additions and 9 deletions

6
dist/index.js vendored
View File

@ -73,8 +73,6 @@ function runMain() {
}); });
} }
const options = cli_1.CLI.SetupCli(); const options = cli_1.CLI.SetupCli();
// eslint-disable-next-line no-console
console.log(`Entrypoint: ${options.mode}`);
if (cli_1.CLI.isCliMode(options)) { if (cli_1.CLI.isCliMode(options)) {
cli_1.CLI.RunCli(options); cli_1.CLI.RunCli(options);
} }
@ -385,6 +383,8 @@ const remote_client_1 = __webpack_require__(95575);
class CLI { class CLI {
static RunCli(options) { static RunCli(options) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
// eslint-disable-next-line no-console
console.log(`Entrypoint: ${options.mode}`);
if (options.mode === 'remote-cli') { if (options.mode === 'remote-cli') {
yield remote_client_1.RemoteClient.Run(options); yield remote_client_1.RemoteClient.Run(options);
} }
@ -679,7 +679,7 @@ class SetupRemoteRepository {
yield remote_client_system_1.RemoteClientSystem.Run(`git lfs install --skip-smudge`); yield remote_client_system_1.RemoteClientSystem.Run(`git lfs install --skip-smudge`);
cloud_runner_logger_1.default.logRemoteCli(cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl); cloud_runner_logger_1.default.logRemoteCli(cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl);
yield remote_client_system_1.RemoteClientSystem.Run(` yield remote_client_system_1.RemoteClientSystem.Run(`
git clone --progress --verbose ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull} git clone --depth 1 ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}
`); `);
yield remote_client_system_1.RemoteClientSystem.Run(` yield remote_client_system_1.RemoteClientSystem.Run(`
git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.gitSha} git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.gitSha}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -28,10 +28,6 @@ async function runMain() {
} }
const options = CLI.SetupCli(); const options = CLI.SetupCli();
// eslint-disable-next-line no-console
console.log(`Entrypoint: ${options.mode}`);
if (CLI.isCliMode(options)) { if (CLI.isCliMode(options)) {
CLI.RunCli(options); CLI.RunCli(options);
} else { } else {

View File

@ -5,6 +5,9 @@ import { RemoteClient } from './remote-client';
export class CLI { export class CLI {
static async RunCli(options: any) { static async RunCli(options: any) {
// eslint-disable-next-line no-console
console.log(`Entrypoint: ${options.mode}`);
if (options.mode === 'remote-cli') { if (options.mode === 'remote-cli') {
await RemoteClient.Run(options); await RemoteClient.Run(options);
} else { } else {
@ -32,6 +35,7 @@ export class CLI {
core.info(`\r\n`); core.info(`\r\n`);
core.info(`INPUT:`); core.info(`INPUT:`);
for (const element of properties) { for (const element of properties) {
// TODO pull description from action.yml
program.option(`--${element} <${element}>`, 'default description'); program.option(`--${element} <${element}>`, 'default description');
if (Input[element] !== undefined && Input[element] !== '') { if (Input[element] !== undefined && Input[element] !== '') {
core.info(`${element} ${Input[element]}`); core.info(`${element} ${Input[element]}`);

View File

@ -148,7 +148,7 @@ export class SetupRemoteRepository {
await RemoteClientSystem.Run(`git lfs install --skip-smudge`); await RemoteClientSystem.Run(`git lfs install --skip-smudge`);
CloudRunnerLogger.logRemoteCli(CloudRunnerState.targetBuildRepoUrl); CloudRunnerLogger.logRemoteCli(CloudRunnerState.targetBuildRepoUrl);
await RemoteClientSystem.Run(` await RemoteClientSystem.Run(`
git clone --progress --verbose ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull} git clone --depth 1 ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}
`); `);
await RemoteClientSystem.Run(` await RemoteClientSystem.Run(`
git checkout ${CloudRunnerState.buildParams.gitSha} git checkout ${CloudRunnerState.buildParams.gitSha}