da1bd48444
- Decouple framework installation: add install-laravel.sh and install-cakephp.sh, isolate skills and docs per framework, and auto-clean leftover artifacts - Remove all SonarQube configs, templates, and references - Enforce comprehensive test completeness: 100% public methods, edge cases, full branch coverage, exception paths, and state assertions - Replace all placeholder assertions in PHPUnit and Pest templates with full realistic implementations - Rename and update 10-comprehensive-test-coverage-guide.md
25 lines
812 B
Bash
Executable File
25 lines
812 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
SOURCE="${BASH_SOURCE[0]:-$0}"
|
|
SCRIPT_DIR=""
|
|
if [ -f "$SOURCE" ]; then
|
|
SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE")" 2>/dev/null && pwd || echo "")"
|
|
fi
|
|
|
|
if [ -n "$SCRIPT_DIR" ] && [ -f "$SCRIPT_DIR/install.sh" ]; then
|
|
bash "$SCRIPT_DIR/install.sh" --cakephp "$@"
|
|
else
|
|
DEFAULT_REPO="https://git.smartgift.io.vn/Smartgift-AI/agent-unit-testing.git"
|
|
REPO_URL="${SG_TEST_REPO:-${LARAVEL_TEST_REPO:-$DEFAULT_REPO}}"
|
|
TMP_DIR="$(mktemp -d 2>/dev/null || mktemp -d -t 'sg_cakephp_install')"
|
|
if git clone --depth 1 "$REPO_URL" "$TMP_DIR" --quiet 2>/dev/null; then
|
|
bash "$TMP_DIR/install.sh" --cakephp "$@"
|
|
rm -rf "$TMP_DIR"
|
|
else
|
|
echo "Lỗi: Không thể tải bộ công cụ từ $REPO_URL"
|
|
rm -rf "$TMP_DIR"
|
|
exit 1
|
|
fi
|
|
fi
|