build: make git-sync toggle + diag env-path aware
Grav Admin saves plugin config into the active environment's config tree (user/env/<host>/config/plugins/) when an env override dir exists — so git-sync.yaml landed there, not in user/config/plugins/. Update the toggle script to take a WEBROOT and search both locations (env path first), and update remote-git-sync-disable/enable to pass WEBROOT. remote-diag now surfaces git-sync config (secrets redacted) from either location. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Np4cMQLF77i664CAQXySzU
This commit is contained in:
@@ -167,10 +167,10 @@ remote-upgrade-grav: guard-env
|
||||
$(SSH) "cd $(WEBROOT) && php bin/gpm self-upgrade -y && php bin/grav cache"
|
||||
|
||||
remote-git-sync-disable: guard-env
|
||||
$(SSH) "bash -s -- '$(WEBROOT)/user/config/plugins/git-sync.yaml' false" < scripts/git-sync-toggle.sh
|
||||
$(SSH) "bash -s -- '$(WEBROOT)' false" < scripts/git-sync-toggle.sh
|
||||
|
||||
remote-git-sync-enable: guard-env
|
||||
$(SSH) "bash -s -- '$(WEBROOT)/user/config/plugins/git-sync.yaml' true" < scripts/git-sync-toggle.sh
|
||||
$(SSH) "bash -s -- '$(WEBROOT)' true" < scripts/git-sync-toggle.sh
|
||||
|
||||
remote-content-status: guard-env
|
||||
$(SSH) "cd $(WEBROOT)/user && git status --short && echo '--- config diff ---' && git diff -- config/"
|
||||
@@ -206,6 +206,7 @@ remote-diag: guard-env
|
||||
echo '=== api override (enabled/route/session) ==='; grep -nE '^enabled:|^route:|session_enabled:' user/config/plugins/api.yaml 2>&1; \
|
||||
echo '=== per-env override present? ==='; for f in user/env/*/config/system.yaml; do echo \"\$$f:\"; cat \"\$$f\" 2>/dev/null | grep -E 'cache:|debug:|auto_reload:'; done; \
|
||||
echo '=== twig cache populating? (non-empty => cache on) ==='; ls cache/twig/ 2>/dev/null | head -1 || echo '(empty)'; \
|
||||
echo '=== git-sync config (secrets redacted) ==='; grep -vaiE 'password|token|secret' user/config/plugins/git-sync.yaml user/env/*/config/plugins/git-sync.yaml 2>/dev/null; \
|
||||
echo '=== grav.log tail ==='; tail -8 logs/grav.log 2>/dev/null"
|
||||
|
||||
remote-maintenance-on: guard-env
|
||||
|
||||
Reference in New Issue
Block a user