Implement core script improvements

- Add joomla_manifest.sh library with manifest parsing functions
- Add smoke_test.sh for repository validation
- Add versions.sh for version management
- Add JSON utilities to common.sh
- Fix logging.sh with proper enhanced logging functions
- Make all scripts executable

Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-03 21:33:31 +00:00
parent 265ec252e9
commit ef039cf91f
19 changed files with 585 additions and 77 deletions

27
scripts/lib/common.sh Normal file → Executable file
View File

@@ -102,6 +102,33 @@ normalize_path() {
printf '%s\n' "$1" | sed 's|\\|/|g'
}
# ----------------------------------------------------------------------------
# JSON utilities
# ----------------------------------------------------------------------------
json_escape() {
require_cmd python3
python3 -c 'import json,sys; print(json.dumps(sys.argv[1]))' "$1"
}
json_output() {
local status="$1"
shift
require_cmd python3
python3 - <<PY "$status" "$@"
import json
import sys
status = sys.argv[1]
pairs = sys.argv[2:]
data = {"status": status}
for pair in pairs:
if "=" in pair:
k, v = pair.split("=", 1)
data[k] = v
print(json.dumps(data, ensure_ascii=False))
PY
}
# ----------------------------------------------------------------------------
# Guardrails
# ----------------------------------------------------------------------------