Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed May 17, 2024
1 parent 70c8b53 commit d4b8043
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/cdk/src/docs-fe-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export class DocsFeStack extends Stack {
}),
);

validateFolderIsNextJsBuildFolder(LOCAL_PREVIEW_BUNDLE_OUT_DIR);

const local_preview_bundle_dist_zip = path.resolve(__dirname, "../../ui/local-preview-bundle/dist/out.zip");
void zipFolder(LOCAL_PREVIEW_BUNDLE_OUT_DIR, local_preview_bundle_dist_zip).then(() => {
new BucketDeployment(this, "deploy-local-preview-bundle2", {
Expand All @@ -60,18 +58,6 @@ function mkdir(dir: string) {
}
}

function validateFolderIsNextJsBuildFolder(sourceFolder: string) {
// test that source folder exists and is a folder
if (!fs.existsSync(sourceFolder) || !fs.statSync(sourceFolder).isDirectory()) {
throw new Error(`${sourceFolder} does not exist`);
}

// contains BUILD_ID file
if (!fs.existsSync(path.join(sourceFolder, "BUILD_ID"))) {
throw new Error(`${sourceFolder} does not contain a BUILD_ID file`);
}
}

async function zipFolder(sourceFolder: string, zipFilePath: string) {
mkdir(path.dirname(zipFilePath));

Expand Down

0 comments on commit d4b8043

Please sign in to comment.