dbbackup/build.sh

21 lines
532 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# dbbackup 模块 build生成 DDL + CRUD 页面xls2ui
set -e
cdir=$(pwd)
# 1. 生成 DDL
if [ -d models ]; then
json2ddl mysql models/ > "$cdir/models/mysql.ddl.sql" 2>/dev/null || echo " skip ddl"
fi
# 2. 生成 CRUD UIxls2ui 从 json/ 生成到 wwwroot/
if [ -d json ]; then
cd "$cdir/json"
for f in *.json; do
echo " xls2ui $f"
xls2ui -m ../models -o ../wwwroot dbbackup "$f" 2>/dev/null || echo " skipped"
done
fi
echo "=== dbbackup Build Complete ==="