Migrate to a monorepo structure (#2909)

This commit is contained in:
Charles Bochet
2023-12-10 18:10:54 +01:00
committed by GitHub
parent a70a9281eb
commit 5bdca9de6c
2304 changed files with 37152 additions and 25869 deletions

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# scripts/set-env-test.sh
# Get script's directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Construct the absolute path of .env file in the project root directory
ENV_PATH="${SCRIPT_DIR}/../.env.test"
# Check if the file exists
if [ -f "${ENV_PATH}" ]; then
echo "🔵 - Loading environment variables from "${ENV_PATH}"..."
# Export env vars
while IFS= read -r line || [ -n "$line" ]; do
if echo "$line" | grep -F = &>/dev/null
then
varname=$(echo "$line" | cut -d '=' -f 1)
varvalue=$(echo "$line" | cut -d '=' -f 2- | cut -d '#' -f 1)
export "$varname"="$varvalue"
fi
done < <(grep -v '^#' "${ENV_PATH}")
else
echo "Error: ${ENV_PATH} does not exist."
exit 1
fi