custom hook files and test

pull/459/head
Frostebite 2022-10-06 20:20:27 +01:00
parent e8799c71ac
commit 44c3b70cca
3 changed files with 3 additions and 3 deletions

2
dist/index.js vendored
View File

@ -4256,7 +4256,7 @@ class RemoteClient {
const gameCiCustomHooksPath = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `game-ci`, `hooks`); const gameCiCustomHooksPath = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `game-ci`, `hooks`);
const files = fs_1.default.readdirSync(gameCiCustomHooksPath); const files = fs_1.default.readdirSync(gameCiCustomHooksPath);
for (const file of files) { for (const file of files) {
const fileContents = fs_1.default.readFileSync(file, `utf8`); const fileContents = fs_1.default.readFileSync(path_1.default.join(gameCiCustomHooksPath, file), `utf8`);
const fileContentsObject = yaml_1.default.parse(fileContents.toString()); const fileContentsObject = yaml_1.default.parse(fileContents.toString());
if (fileContentsObject.hook === hookLifecycle) { if (fileContentsObject.hook === hookLifecycle) {
remote_client_logger_1.RemoteClientLogger.log(`Active Hook File ${file} contents: ${fileContents}`); remote_client_logger_1.RemoteClientLogger.log(`Active Hook File ${file} contents: ${fileContents}`);

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -132,7 +132,7 @@ export class RemoteClient {
const gameCiCustomHooksPath = path.join(CloudRunnerFolders.repoPathAbsolute, `game-ci`, `hooks`); const gameCiCustomHooksPath = path.join(CloudRunnerFolders.repoPathAbsolute, `game-ci`, `hooks`);
const files = fs.readdirSync(gameCiCustomHooksPath); const files = fs.readdirSync(gameCiCustomHooksPath);
for (const file of files) { for (const file of files) {
const fileContents = fs.readFileSync(file, `utf8`); const fileContents = fs.readFileSync(path.join(gameCiCustomHooksPath, file), `utf8`);
const fileContentsObject = YAML.parse(fileContents.toString()); const fileContentsObject = YAML.parse(fileContents.toString());
if (fileContentsObject.hook === hookLifecycle) { if (fileContentsObject.hook === hookLifecycle) {
RemoteClientLogger.log(`Active Hook File ${file} contents: ${fileContents}`); RemoteClientLogger.log(`Active Hook File ${file} contents: ${fileContents}`);