Files
waf-platform/EdgeAPI/build/sql.sh
2026-03-22 17:37:40 +08:00

13 lines
325 B
Bash

#!/usr/bin/env bash
# generate 'internal/setup/sql.json' file
CWD="$(dirname "$0")"
SQL_JSON="${CWD}/../internal/setup/sql.json"
if [ "$1" = "--force" ] || [ ! -f "$SQL_JSON" ]; then
rm -f "$SQL_JSON"
go run "${CWD}"/../cmd/sql-dump/main.go -dir="${CWD}"
else
echo "sql.json exists, skip (use --force to regenerate)"
fi