mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2026-06-23 04:10:17 +00:00
af0365d9ad
The build script for the backend relied on some bash specifics. Since bash is not available in alpine based node docker images, building failed. This commit replaces bash functions with the native POSIX equivalents. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
29 lines
640 B
Bash
Executable File
29 lines
640 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
#
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR" || exit 1
|
|
|
|
if [ -d "dist" ]; then
|
|
echo "🦔 > Clearing dist directory"
|
|
rm -rf dist
|
|
fi
|
|
|
|
echo "🦔 > Building NestJS application"
|
|
nest build
|
|
|
|
if [ -d "dist/src/database/migrations" ]; then
|
|
echo "🦔 > Removing TypeScript definitions from migrations folder"
|
|
rm -f dist/src/database/migrations/*.d.ts 2>/dev/null || true
|
|
rm -f dist/src/database/migrations/*.map 2>/dev/null || true
|
|
fi
|
|
|
|
echo "🦔 > Done building backend"
|
|
exit 0
|
|
|