From dcc7e6281b4000d662e108f92814dff9c6639242 Mon Sep 17 00:00:00 2001 From: branberry Date: Tue, 3 Oct 2023 10:21:58 -0500 Subject: [PATCH] [DOP-4033]: Remove standard job handler --- .../src/shared/standard-job-runner.ts | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/commands/src/shared/standard-job-runner.ts diff --git a/src/commands/src/shared/standard-job-runner.ts b/src/commands/src/shared/standard-job-runner.ts deleted file mode 100644 index cb0162172..000000000 --- a/src/commands/src/shared/standard-job-runner.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { getRepoDir, checkIfPatched, getCommitHash, executeCliCommand, getPatchId, RSTSPEC_FLAG } from '../helpers'; - -export class StandardJobRunner { - repoName: string; - repoDir: string; - project: string; - - constructor(repoName: string, project: string) { - this.repoName = repoName; - this.project = project; - - this.repoDir = getRepoDir(repoName); - } - - async nextGenParse(): Promise { - const commandArgs = ['build', this.repoDir, '--output', `${this.repoDir}/bundle.zip`, RSTSPEC_FLAG]; - - const hasPatch = await checkIfPatched(this.repoDir); - - if (hasPatch) { - const [patchId, commitHash] = await Promise.all([getPatchId(this.repoDir), getCommitHash(this.repoDir)]); - - commandArgs.push('--commit'); - commandArgs.push(commitHash); - - commandArgs.push('--patch'); - commandArgs.push(patchId); - } - - await executeCliCommand({ command: 'snooty', args: commandArgs }); - } - - async nextGenHtml() { - // copy .env.production to the snooty directory - await executeCliCommand({ command: 'cp', args: [`${this.repoDir}/.env.production`, 'snooty'] }); - - await executeCliCommand({ command: 'echo', args: [`"GATSBY_SITE=${this.project}"`] }); - } - - async nextGenDeploy() { - throw new Error('Not implemented'); - } -}