damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

commit 9c84b874005ab8da35b4634fe54c7cb84839db6f
parent decdd2deedb1780120083ffc230e11b518db081f
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 28 Jan 2024 14:37:14 -0800

build: symlink purple page to get around next bug

next build doesn't set up the purple page properly. Let's just use a
symlink during the build to fix it up.

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mbuild | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/build b/build @@ -1,16 +1,23 @@ #!/usr/bin/env bash +set -eou pipefail + env=$1 npm run i18n if [ "$env" == "staging" ] then + export OUT_DIR="$PWD/out-staging" export NEXT_PUBLIC_PURPLE_API_BASE_URL="https://api-staging.damus.io" - npx next build - mv out out-staging else + export OUT_DIR="$PWD/out-production" export NEXT_PUBLIC_PURPLE_API_BASE_URL="https://api.damus.io" - npx next build - mv out out-production fi + +npx next build +rm -rf "$OUT_DIR" +mv out "$OUT_DIR" + +# TODO: next doesn't seem to set this up properly. bug? +ln "$OUT_DIR/purple.html" "$OUT_DIR/purple/index.html"