From 399c052ca1f081b65b79ceea124bc61e5fff5f88 Mon Sep 17 00:00:00 2001 From: Dave Rogers Date: Thu, 29 Aug 2024 22:29:48 -0700 Subject: [PATCH] chore: pr review fixes (#13) --- data-catalog/.gitignore | 3 +-- ...analytics-catalog.dev.clevercanary.com-build.sh | 14 +++++--------- data-catalog/next.config.mjs | 1 + data-catalog/package.json | 2 +- website/.gitignore | 2 +- ...cc-brc-analytics.dev.clevercanary.com-deploy.sh | 11 ++++------- website/package.json | 2 +- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/data-catalog/.gitignore b/data-catalog/.gitignore index b43abcc..f17de48 100644 --- a/data-catalog/.gitignore +++ b/data-catalog/.gitignore @@ -29,6 +29,5 @@ npm-debug.log* # favicons /public/favicons/* - # Build Dir -/build \ No newline at end of file +/out \ No newline at end of file diff --git a/data-catalog/cc-brc-analytics-catalog.dev.clevercanary.com-build.sh b/data-catalog/cc-brc-analytics-catalog.dev.clevercanary.com-build.sh index b43e616..8f71969 100755 --- a/data-catalog/cc-brc-analytics-catalog.dev.clevercanary.com-build.sh +++ b/data-catalog/cc-brc-analytics-catalog.dev.clevercanary.com-build.sh @@ -1,24 +1,20 @@ #!/usr/bin/env bash +# Exit immediately if a command exits with a non-zero status +set -e echo \"Deleting ./out/\" rm -rf ./out -echo \"Deleting ./build/\" -rm -rf ./build - +# install node version 20.10.0 n 20.10.0 npm ci export NEXT_PUBLIC_BASE_PATH="/data" -mkdir -p build/data - -# Build AnVIL -rm -rf ./out +# Build catalog npm run build:local -mv out/* build/data export BUCKET=s3://tik-brc-analytics.dev.data/ -export SRCDIR=build/ +export SRCDIR=out/ aws s3 sync $SRCDIR $BUCKET --delete --profile excira aws cloudfront create-invalidation --distribution-id E1OF5ESEGD5VAG --paths "/*" --profile excira \ No newline at end of file diff --git a/data-catalog/next.config.mjs b/data-catalog/next.config.mjs index 405223f..6973b2d 100644 --- a/data-catalog/next.config.mjs +++ b/data-catalog/next.config.mjs @@ -15,6 +15,7 @@ export default withPlugins( [[withMDX, { pageExtensions: ["md", "mdx", "ts", "tsx"] }]], { basePath: process.env.NEXT_PUBLIC_BASE_PATH || "", + distDir: "out/data", experimental: { instrumentationHook: true, }, diff --git a/data-catalog/package.json b/data-catalog/package.json index 1af87c6..4f38ad6 100644 --- a/data-catalog/package.json +++ b/data-catalog/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "./scripts/dev.sh brc-analytics-catalog && next dev", "build:local": "./scripts/build.sh brc-analytics-catalog local && next build", - "start": "next start", + "start": "npx serve out", "lint": "next lint --dir .", "check-format": "prettier --check .", "test": "jest --runInBand" diff --git a/website/.gitignore b/website/.gitignore index f6ab3c2..b98a8b0 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -30,4 +30,4 @@ npm-debug.log* /public/favicons/* # Build Dir -/build \ No newline at end of file +/out diff --git a/website/cc-brc-analytics.dev.clevercanary.com-deploy.sh b/website/cc-brc-analytics.dev.clevercanary.com-deploy.sh index 5560ccd..1d637d5 100755 --- a/website/cc-brc-analytics.dev.clevercanary.com-deploy.sh +++ b/website/cc-brc-analytics.dev.clevercanary.com-deploy.sh @@ -1,23 +1,20 @@ #!/usr/bin/env bash +# Exit immediately if a command exits with a non-zero status +set -e + echo \"Deleting ./out/\" rm -rf ./out -echo \"Deleting ./build/\" -rm -rf ./build - n 20.10.0 npm ci -mkdir -p build # Build the website -rm -rf ./out npm run build:local -mv out/* build export BUCKET=s3://tik-brc-analytics.dev/ -export SRCDIR=build/ +export SRCDIR=out/ aws s3 sync $SRCDIR $BUCKET --delete --profile excira aws cloudfront create-invalidation --distribution-id E1OF5ESEGD5VAG --paths "/*" --profile excira \ No newline at end of file diff --git a/website/package.json b/website/package.json index b7e17eb..6b77792 100644 --- a/website/package.json +++ b/website/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "./scripts/dev.sh brc-analytics-site && next dev", "build:local": "./scripts/build.sh brc-analytics-site local && next build", - "start": "next start", + "start": "npx serve out", "lint": "next lint --dir .", "check-format": "prettier --check .", "test": "jest --runInBand"