Custom step file support

pull/437/head
Frostebite 2022-10-08 01:01:44 +01:00
parent 9c5523a800
commit f5faae57d3
3 changed files with 3 additions and 5 deletions

3
dist/index.js vendored
View File

@ -4424,14 +4424,13 @@ const custom_workflow_1 = __nccwpck_require__(3786);
const remote_client_logger_1 = __nccwpck_require__(59412); const remote_client_logger_1 = __nccwpck_require__(59412);
const path_1 = __importDefault(__nccwpck_require__(71017)); const path_1 = __importDefault(__nccwpck_require__(71017));
const fs = __importStar(__nccwpck_require__(57147)); const fs = __importStar(__nccwpck_require__(57147));
const cloud_runner_folders_1 = __nccwpck_require__(13527);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855)); const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const input_1 = __importDefault(__nccwpck_require__(91933)); const input_1 = __importDefault(__nccwpck_require__(91933));
class CloudRunnerCustomSteps { class CloudRunnerCustomSteps {
static GetCustomStepsFromFiles(hookLifecycle) { static GetCustomStepsFromFiles(hookLifecycle) {
const results = []; const results = [];
remote_client_logger_1.RemoteClientLogger.log(`GetCustomStepFiles: ${hookLifecycle}`); remote_client_logger_1.RemoteClientLogger.log(`GetCustomStepFiles: ${hookLifecycle}`);
const gameCiCustomStepsPath = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `game-ci`, `steps`); const gameCiCustomStepsPath = path_1.default.join(process.cwd(), `game-ci`, `steps`);
const files = fs.readdirSync(gameCiCustomStepsPath); const files = fs.readdirSync(gameCiCustomStepsPath);
for (const file of files) { for (const file of files) {
const fileContents = fs.readFileSync(path_1.default.join(gameCiCustomStepsPath, file), `utf8`); const fileContents = fs.readFileSync(path_1.default.join(gameCiCustomStepsPath, file), `utf8`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@ import { CustomWorkflow } from '../workflows/custom-workflow';
import { RemoteClientLogger } from '../remote-client/remote-client-logger'; import { RemoteClientLogger } from '../remote-client/remote-client-logger';
import path from 'path'; import path from 'path';
import * as fs from 'fs'; import * as fs from 'fs';
import { CloudRunnerFolders } from './cloud-runner-folders';
import CloudRunnerLogger from './cloud-runner-logger'; import CloudRunnerLogger from './cloud-runner-logger';
import Input from '../../input'; import Input from '../../input';
@ -14,7 +13,7 @@ export class CloudRunnerCustomSteps {
static GetCustomStepsFromFiles(hookLifecycle: string): CustomStep[] { static GetCustomStepsFromFiles(hookLifecycle: string): CustomStep[] {
const results: CustomStep[] = []; const results: CustomStep[] = [];
RemoteClientLogger.log(`GetCustomStepFiles: ${hookLifecycle}`); RemoteClientLogger.log(`GetCustomStepFiles: ${hookLifecycle}`);
const gameCiCustomStepsPath = path.join(CloudRunnerFolders.repoPathAbsolute, `game-ci`, `steps`); const gameCiCustomStepsPath = path.join(process.cwd(), `game-ci`, `steps`);
const files = fs.readdirSync(gameCiCustomStepsPath); const files = fs.readdirSync(gameCiCustomStepsPath);
for (const file of files) { for (const file of files) {
const fileContents = fs.readFileSync(path.join(gameCiCustomStepsPath, file), `utf8`); const fileContents = fs.readFileSync(path.join(gameCiCustomStepsPath, file), `utf8`);