diff --git a/dist/index.js b/dist/index.js index 373259f6..18831b28 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 7a479523..819eb419 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/cloud-runner/remote-client/index.ts b/src/model/cloud-runner/remote-client/index.ts index c949cb31..ee0a1f43 100644 --- a/src/model/cloud-runner/remote-client/index.ts +++ b/src/model/cloud-runner/remote-client/index.ts @@ -15,7 +15,7 @@ import BuildParameters from '../../build-parameters'; export class RemoteClient { @CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`) - static async runRemoteClientJob() { + static async setupRemoteClient() { CloudRunnerLogger.log(`bootstrap game ci cloud runner...`); if (!(await RemoteClient.handleRetainedWorkspace())) { await RemoteClient.bootstrapRepository(); @@ -23,9 +23,27 @@ export class RemoteClient { await RemoteClient.replaceLargePackageReferencesWithSharedReferences(); await RemoteClient.runCustomHookFiles(`before-build`); } + @CliFunction(`remote-cli-build`, `sets up a repository, usually before a game-ci build`) + static async remoteClientBuild() { + CloudRunnerLogger.log(`bootstrap game ci cloud runner...`); + const distFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist'); + const ubuntuPlatformsFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu'); + CloudRunnerSystem.Run(`mkdir -p ${`${CloudRunnerFolders.ToLinuxFolder( + CloudRunnerFolders.projectBuildFolderAbsolute, + )}/build`} + cd ${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectPathAbsolute)} + cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction" + cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh" + cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" + chmod -R +x "/entrypoint.sh" + chmod -R +x "/steps" + echo "game ci start" + /entrypoint.sh + echo "game ci caching results"`); + } @CliFunction(`remote-cli-post-build`, `runs a cloud runner build`) - public static async PostCLIBuild(): Promise { + public static async remoteClientPostBuild(): Promise { RemoteClientLogger.log(`Running POST build tasks`); await Caching.PushToCache( diff --git a/src/model/cloud-runner/workflows/build-automation-workflow.ts b/src/model/cloud-runner/workflows/build-automation-workflow.ts index 2f7cbb09..8a41d018 100644 --- a/src/model/cloud-runner/workflows/build-automation-workflow.ts +++ b/src/model/cloud-runner/workflows/build-automation-workflow.ts @@ -97,21 +97,8 @@ node ${builderPath} -m remote-cli-pre-build`; } private static BuildCommands(builderPath: string) { - const distFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist'); - const ubuntuPlatformsFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu'); - return `echo "game ci cloud runner initalized" - mkdir -p ${`${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectBuildFolderAbsolute)}/build`} - cd ${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectPathAbsolute)} - cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction" - cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh" - cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps" - chmod -R +x "/entrypoint.sh" - chmod -R +x "/steps" - echo "game ci start" - /entrypoint.sh - echo "game ci caching results" - chmod +x ${builderPath} + node ${builderPath} -m remote-cli-build node ${builderPath} -m remote-cli-post-build`; } }