Scaffold Cloudron packaging workspace and automation

This commit is contained in:
2025-10-02 12:07:09 -05:00
parent b4121cc932
commit 482d4ff1b8
414 changed files with 6837 additions and 2 deletions

16
scripts/hooks/install_hooks.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)
HOOK_DIR="${REPO_ROOT}/.git/hooks"
if [[ ! -d "${HOOK_DIR}" ]]; then
echo "This script must be run inside a git repository." >&2
exit 1
fi
for hook in pre-commit post-commit pre-push; do
ln -sf "${REPO_ROOT}/scripts/hooks/${hook}" "${HOOK_DIR}/${hook}"
chmod +x "${HOOK_DIR}/${hook}"
echo "Installed ${hook} hook"
done