Skip to content

Commit

Permalink
further integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Oct 13, 2023
1 parent 7fdd339 commit 3a68efe
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/job/jobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export abstract class JobHandler {

private cleanup(): void {
this._fileSystemServices.removeDirectory(`repos/${this.currJob.payload.repoName}`);
this._fileSystemServices.removeDirectory(`repos/${this.currJob.payload.repoName}/cloud-docs`);
}

@throwIfJobInterupted()
Expand Down Expand Up @@ -235,7 +236,10 @@ export abstract class JobHandler {

@throwIfJobInterupted()
public isbuildNextGen(): boolean {
const workerPath = `repos/${this.currJob.payload.repoName}/worker.sh`;
let workerPath = `repos/${this.currJob.payload.repoName}/worker.sh`;
if (this.currJob.payload.repoName === 'docs-monorepo')
workerPath = `repos/${this.currJob.payload.repoName}/${this.currJob.payload.project}/worker.sh`;
// const workerPath = `repos/${this.currJob.payload.repoName}/worker.sh`;
if (this._fileSystemServices.rootFileExists(workerPath)) {
const workerContents = this._fileSystemServices.readFileAsUtf8(workerPath);
const workerLines = workerContents.split(/\r?\n/);
Expand Down Expand Up @@ -393,7 +397,10 @@ export abstract class JobHandler {
for (const [envName, envValue] of Object.entries(snootyFrontEndVars)) {
if (envValue) envVars += `${envName}=${envValue}\n`;
}
this._fileSystemServices.writeToFile(`repos/${this.currJob.payload.repoName}/.env.production`, envVars, {
let fileToWriteTo = `repos/${this.currJob.payload.repoName}/.env.production`;
if (this.currJob.payload.repoName === 'docs-monorepo')
fileToWriteTo = `repos/${this.currJob.payload.repoName}/${this.currJob.payload.project}/.env.production`;
this._fileSystemServices.writeToFile(fileToWriteTo, envVars, {
encoding: 'utf8',
flag: 'w',
});
Expand Down

0 comments on commit 3a68efe

Please sign in to comment.