pull/310/head
Frostebite 2021-12-26 02:49:07 +00:00
parent cf7b9938b7
commit 9876ce965e
3 changed files with 29 additions and 29 deletions

54
dist/index.js vendored
View File

@ -609,7 +609,7 @@ class SetupRemoteRepository {
static cacheLatestLFSFiles(LFS_ASSETS_HASH, lfsCacheFolder) {
return __awaiter(this, void 0, void 0, function* () {
process.chdir(`${cloud_runner_state_1.CloudRunnerState.lfsDirectory}/..`);
yield remote_client_system_1.RemoteClientSystem.Run(`zip -r ${LFS_ASSETS_HASH}.zip "lfs"`);
yield remote_client_system_1.RemoteClientSystem.Run(`zip -r "${LFS_ASSETS_HASH}.zip" "lfs"`);
fs_1.default.copyFileSync(`${LFS_ASSETS_HASH}.zip`, lfsCacheFolder);
cloud_runner_logger_1.default.logRemoteCli(`copied ${LFS_ASSETS_HASH} to ${lfsCacheFolder}`);
});
@ -2714,23 +2714,23 @@ class BuildStep {
return __awaiter(this, void 0, void 0, function* () {
cloud_runner_logger_1.default.logLine('Starting part 2/2 (build unity project)');
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildGuid, image, [
`
export GITHUB_WORKSPACE="${cloud_runner_state_1.CloudRunnerState.repoPathFull}"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/default-build-script/" "/UnityBuilderAction"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/entrypoint.sh" "/entrypoint.sh"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/steps/" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
/entrypoint.sh
apk update -q
apk add zip tree -q
cd "$libraryFolderFull/.."
zip -r "lib-$BUILDID.zip" "./Library"
mv "lib-$BUILDID.zip" "/$cacheFolderFull/lib"
cd "$repoPathFull"
ls -lh "$repoPathFull"
zip -r "build-$BUILDID.zip" "./${cloud_runner_state_1.CloudRunnerState.buildParams.buildPath}"
mv "build-$BUILDID.zip" "/$cacheFolderFull/build-$BUILDID.zip"
`
export GITHUB_WORKSPACE="${cloud_runner_state_1.CloudRunnerState.repoPathFull}"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/default-build-script/" "/UnityBuilderAction"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/entrypoint.sh" "/entrypoint.sh"
cp -r "${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/steps/" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
/entrypoint.sh
apk update -q
apk add zip tree -q
cd "$libraryFolderFull/.."
zip -r "lib-$BUILDID.zip" "./Library"
mv "lib-$BUILDID.zip" "/$cacheFolderFull/lib"
cd "$repoPathFull"
ls -lh "$repoPathFull"
zip -r "build-$BUILDID.zip" "./${cloud_runner_state_1.CloudRunnerState.buildParams.buildPath}"
mv "build-$BUILDID.zip" "/$cacheFolderFull/build-$BUILDID.zip"
`,
], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.projectPathFull}`, environmentVariables, secrets);
});
@ -2778,15 +2778,15 @@ class SetupStep {
try {
cloud_runner_logger_1.default.logLine('Starting step 1/2 download game files from repository, try to use cache');
yield cloud_runner_state_1.CloudRunnerState.CloudRunnerProviderPlatform.runTask(cloud_runner_state_1.CloudRunnerState.buildGuid, image, [
`
apk update -q
apk add unzip zip git-lfs jq tree nodejs -q
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
mkdir -p ${cloud_runner_state_1.CloudRunnerState.builderPathFull}
echo "${cloud_runner_state_1.CloudRunnerState.cloneBuilderCommand}"
${cloud_runner_state_1.CloudRunnerState.cloneBuilderCommand}
chmod +x ${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/index.js
node ${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/index.js -m remote-cli
`
apk update -q
apk add unzip zip git-lfs jq tree nodejs -q
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
mkdir -p ${cloud_runner_state_1.CloudRunnerState.builderPathFull}
echo "${cloud_runner_state_1.CloudRunnerState.cloneBuilderCommand}"
${cloud_runner_state_1.CloudRunnerState.cloneBuilderCommand}
chmod +x ${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/index.js
node ${cloud_runner_state_1.CloudRunnerState.builderPathFull}/dist/index.js -m remote-cli
`,
], `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}`, `/${cloud_runner_state_1.CloudRunnerState.buildVolumeFolder}/`, environmentVariables, secrets);
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -74,7 +74,7 @@ export class SetupRemoteRepository {
private static async cacheLatestLFSFiles(LFS_ASSETS_HASH: string, lfsCacheFolder: string) {
process.chdir(`${CloudRunnerState.lfsDirectory}/..`);
await RemoteClientSystem.Run(`zip -r ${LFS_ASSETS_HASH}.zip "lfs"`);
await RemoteClientSystem.Run(`zip -r "${LFS_ASSETS_HASH}.zip" "lfs"`);
fs.copyFileSync(`${LFS_ASSETS_HASH}.zip`, lfsCacheFolder);
CloudRunnerLogger.logRemoteCli(`copied ${LFS_ASSETS_HASH} to ${lfsCacheFolder}`);
}