Skip to content

Commit

Permalink
chore: build scripts for new envs and basepath (#3701)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoopDog committed Nov 28, 2023
1 parent f3c7310 commit 85c48a3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ mkdir -p build/explore
# Build AnVIL
rm -rf ./out
npm run build-dev:hca-dcp
mv out/explore/* build/explore
mv out/* build

export BUCKET=s3://wb8-explorer/
export BUCKET=s3://tha-explore.data.humancellatlas.dev/
export SRCDIR=build/

aws s3 sync $SRCDIR $BUCKET --delete --profile excira
aws cloudfront create-invalidation --distribution-id E2SLGSHX4H0LO7 --paths "/*" --profile excira
aws cloudfront create-invalidation --distribution-id E3Q3S6QTTZHFMI --paths "/*" --profile excira
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Set the script to exit immediately on error
set -e

echo \"Deleting ./out/\"
rm -rf ./out

echo \"Deleting ./build/\"
rm -rf ./build

n 16.15.1
npm ci

mkdir -p build

# Build AnVIL
rm -rf ./out
npm run build-prod:hca-dcp
mv out/* build

export BUCKET=s3://wve-data.humancellatlas.org.explore/
export SRCDIR=build/

aws s3 sync $SRCDIR $BUCKET --delete --profile platform-hca-portal
aws cloudfront create-invalidation --distribution-id EYL2CSEQ4Z28Q --paths "/*" --profile platform-hca-portal
3 changes: 2 additions & 1 deletion explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"build:anvil-cmg": "./scripts/build.sh anvil-cmg && next build && next export -o out/explore && npm run postbuild",
"build-cc-dev:anvil-cmg": "./scripts/common-build.sh anvil-cmg cc-dev && next build && next export -o out && npm run postbuild",
"dev:hca-dcp": "./scripts/dev.sh hca-dcp && next dev",
"build-dev:hca-dcp": "./scripts/build.sh hca-dcp dev && next build && next export -o out/explore && npm run postbuild",
"build-dev:hca-dcp": "./scripts/build.sh hca-dcp dev && next build && next export -o out && npm run postbuild",
"build-prod:hca-dcp": "./scripts/build.sh hca-dcp prod && next build && next export -o out && npm run postbuild",
"postbuild": "next-sitemap --config next-sitemap.config.mjs",
"start": "npx serve out",
"lint": "next lint --dir .",
Expand Down
2 changes: 1 addition & 1 deletion explorer/site-config/hca-dcp/dev/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NEXT_PUBLIC_SITE_CONFIG='hca-dcp-dev'
NEXT_PUBLIC_SITEMAP_DOMAIN='https://dev.singlecell.gi.ucsc.edu'
NEXT_PUBLIC_SITEMAP_DOMAIN='https://explore.data.humancellatlas.clevercanary.com'
3 changes: 2 additions & 1 deletion explorer/site-config/hca-dcp/dev/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ import { supportConfig } from "./support/support";

// Template constants
const APP_TITLE = "HCA Data Explorer";
const BROWSER_URL = "https://data.humancellatlas.dev.clevercanary.com";
const ORG_URL = "https://www.humancellatlas.org";
const PORTAL_URL = "https://data.humancellatlas.dev.clevercanary.com";
const BROWSER_URL = "https://explore.data.humancellatlas.dev.clevercanary.com";

const FONT_FAMILY_DIN = "'din-2014', sans-serif";
const PAGINATION_PAGE_SIZE = "25";
export const PROJECTS_URL = "/projects";
Expand Down
2 changes: 1 addition & 1 deletion explorer/site-config/hca-dcp/prod/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NEXT_PUBLIC_SITE_CONFIG='hca-dcp-prod'
NEXT_PUBLIC_SITEMAP_DOMAIN='https://data.humancellatlas.org'
NEXT_PUBLIC_SITEMAP_DOMAIN='https://explore.data.humancellatlas.org'
4 changes: 3 additions & 1 deletion explorer/site-config/hca-dcp/prod/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import * as C from "../../../app/components";
import devConfig from "../dev/config";

// Template constants
const BROWSER_URL = "https://data.humancellatlas.org";

const ORG_URL = "https://www.humancellatlas.org";

const PORTAL_URL = "https://data.humancellatlas.org";
const BROWSER_URL = "https://explore.data.humancellatlas.org";

const config: SiteConfig = {
...devConfig,
Expand Down

0 comments on commit 85c48a3

Please sign in to comment.