mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
fix
This commit is contained in:
parent
f8d0a490b9
commit
eb0a426d67
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
BIN
dist/licenses.txt
generated
vendored
BIN
dist/licenses.txt
generated
vendored
Binary file not shown.
@ -44,6 +44,7 @@
|
|||||||
"nanoid": "^3.3.1",
|
"nanoid": "^3.3.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"semver": "^7.5.2",
|
"semver": "^7.5.2",
|
||||||
|
"ts-md5": "^1.3.1",
|
||||||
"unity-changeset": "^2.0.0",
|
"unity-changeset": "^2.0.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"yaml": "^2.2.2"
|
"yaml": "^2.2.2"
|
||||||
|
@ -3,7 +3,7 @@ import fs from 'node:fs';
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import CloudRunner from '../cloud-runner';
|
import CloudRunner from '../cloud-runner';
|
||||||
import CloudRunnerOptions from '../options/cloud-runner-options';
|
import CloudRunnerOptions from '../options/cloud-runner-options';
|
||||||
const md5 = require('md5');
|
import * as md5 from 'ts-md5';
|
||||||
|
|
||||||
export class RemoteClientLogger {
|
export class RemoteClientLogger {
|
||||||
private static get LogFilePath() {
|
private static get LogFilePath() {
|
||||||
@ -51,22 +51,24 @@ export class RemoteClientLogger {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
CloudRunnerLogger.log(`Log file exist`);
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 1));
|
||||||
|
|
||||||
let hashedLogs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString();
|
// let hashedLogs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString();
|
||||||
|
//
|
||||||
hashedLogs = md5(hashedLogs);
|
// hashedLogs = md5(hashedLogs);
|
||||||
|
//
|
||||||
for (let index = 0; index < 3; index++) {
|
// for (let index = 0; index < 3; index++) {
|
||||||
CloudRunnerLogger.log(`LOGHASH: ${hashedLogs}`);
|
// CloudRunnerLogger.log(`LOGHASH: ${hashedLogs}`);
|
||||||
const logs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString();
|
// const logs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString();
|
||||||
CloudRunnerLogger.log(`LOGS: ${Buffer.from(logs).toString('base64')}`);
|
// CloudRunnerLogger.log(`LOGS: ${Buffer.from(logs).toString('base64')}`);
|
||||||
CloudRunnerLogger.log(
|
// CloudRunnerLogger.log(
|
||||||
`Game CI's "Cloud Runner System" will cancel the log when it has successfully received the log data to verify all logs have been received.`,
|
// `Game CI's "Cloud Runner System" will cancel the log when it has successfully received the log data to verify all logs have been received.`,
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
// wait for 15 seconds to allow the log to be sent
|
// // wait for 15 seconds to allow the log to be sent
|
||||||
await new Promise((resolve) => setTimeout(resolve, 15000));
|
// await new Promise((resolve) => setTimeout(resolve, 15000));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
public static HandleLog(message: string): boolean {
|
public static HandleLog(message: string): boolean {
|
||||||
if (message.includes('LOGHASH: ')) {
|
if (message.includes('LOGHASH: ')) {
|
||||||
@ -77,7 +79,7 @@ export class RemoteClientLogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RemoteClientLogger.value += message;
|
RemoteClientLogger.value += message;
|
||||||
const hashedValue = md5(RemoteClientLogger.value);
|
const hashedValue = md5.Md5.hashStr(RemoteClientLogger.value);
|
||||||
if (RemoteClientLogger.md5 === hashedValue) {
|
if (RemoteClientLogger.md5 === hashedValue) {
|
||||||
CloudRunnerLogger.log(`LOG COMPLETE`);
|
CloudRunnerLogger.log(`LOG COMPLETE`);
|
||||||
|
|
||||||
@ -96,7 +98,7 @@ export class RemoteClientLogger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static HandleLogFull(message: string): boolean {
|
public static HandleLogFull(message: string): boolean {
|
||||||
const hashedValue = md5(message);
|
const hashedValue = md5.Md5.hashStr(message);
|
||||||
if (RemoteClientLogger.md5 === hashedValue) {
|
if (RemoteClientLogger.md5 === hashedValue) {
|
||||||
CloudRunnerLogger.log(`LOG COMPLETE`);
|
CloudRunnerLogger.log(`LOG COMPLETE`);
|
||||||
|
|
||||||
|
@ -6031,6 +6031,11 @@ ts-jest@^27.1.3:
|
|||||||
semver "7.x"
|
semver "7.x"
|
||||||
yargs-parser "20.x"
|
yargs-parser "20.x"
|
||||||
|
|
||||||
|
ts-md5@^1.3.1:
|
||||||
|
version "1.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-md5/-/ts-md5-1.3.1.tgz#f5b860c0d5241dd9bb4e909dd73991166403f511"
|
||||||
|
integrity sha512-DiwiXfwvcTeZ5wCE0z+2A9EseZsztaiZtGrtSaY5JOD7ekPnR/GoIVD5gXZAlK9Na9Kvpo9Waz5rW64WKAWApg==
|
||||||
|
|
||||||
ts-node@10.8.1:
|
ts-node@10.8.1:
|
||||||
version "10.8.1"
|
version "10.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066"
|
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.8.1.tgz#ea2bd3459011b52699d7e88daa55a45a1af4f066"
|
||||||
|
Loading…
Reference in New Issue
Block a user