Update setup docs and scripts
Refresh setup docs, add ZXDB local setup script, and note deploy rules. Signed-off-by: codex@lucy.xalior.com
This commit is contained in:
@@ -8,6 +8,10 @@ if ! git diff --quiet || ! git diff --cached --quiet; then
|
||||
echo "Working tree is not clean. Commit or stash changes before deploy."
|
||||
exit 1
|
||||
fi
|
||||
if git ls-files --others --exclude-standard | grep -q .; then
|
||||
echo "Untracked files present. Commit or remove them before deploy."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
git checkout "${current_branch}" >/dev/null 2>&1 || true
|
||||
|
||||
18
bin/setup-zxdb-local.sh
Executable file
18
bin/setup-zxdb-local.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
git_dir="$(git -C ZXDB rev-parse --git-dir)"
|
||||
exclude_file="${git_dir}/info/exclude"
|
||||
|
||||
mkdir -p "$(dirname "${exclude_file}")"
|
||||
touch "${exclude_file}"
|
||||
|
||||
add_exclude() {
|
||||
local pattern="$1"
|
||||
if ! grep -Fxq "${pattern}" "${exclude_file}"; then
|
||||
printf "%s\n" "${pattern}" >> "${exclude_file}"
|
||||
fi
|
||||
}
|
||||
|
||||
add_exclude "ZXDB_mysql.sql"
|
||||
add_exclude "ZXDB_mysql_STRUCTURE_ONLY.sql"
|
||||
Reference in New Issue
Block a user