mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-28 05:54:43 -04:00
wip
This commit is contained in:
parent
159a100b0d
commit
efec25e4fb
29 changed files with 25 additions and 1134 deletions
|
@ -7,31 +7,10 @@
|
|||
|
||||
set -e
|
||||
|
||||
cleanup () {
|
||||
if [ -d ../tmp/src/pages/api ]; then
|
||||
echo "🦔 > Moving Mock API files back"
|
||||
mv ../tmp/src/pages/api src/pages
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "🦔 Frontend Production Build"
|
||||
echo "🦔 > Clearing existing builds"
|
||||
rm -rf dist/
|
||||
|
||||
echo "🦔 > Preparing files"
|
||||
if [ ! -z "${NEXT_PUBLIC_USE_MOCK_API}" ]; then
|
||||
echo "🦔 > Keeping Mock API because NEXT_PUBLIC_USE_MOCK_API is set"
|
||||
if [ ! -d src/pages/api ]; then
|
||||
echo "🦔 > ⚠️ src/pages/api doesn't exist"
|
||||
fi
|
||||
else
|
||||
echo "🦔 > Moving Mock API because NEXT_PUBLIC_USE_MOCK_API is unset"
|
||||
mkdir -p ../tmp/src/pages
|
||||
mv src/pages/api ../tmp/src/pages/
|
||||
fi
|
||||
|
||||
echo "🦔 > Building"
|
||||
BUILD_TIME=true next build
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue