Repository navigation
refactor: split sync-runtime.sh into deploy/lib modules (#21) - #32
Merged
Merged
Conversation
Keep the operator CLI (snapshot|restore|sync flags and sync.env) unchanged. Move dump, restore, SSH, volumes, live guards, and rewrite glue into small sourced libs. vps-common now uses the shared identity/compose helpers. Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split the kitchen-sink
deploy/sync-runtime.shinto a thin CLI dispatcher plus small sourced libs. Operator commands, flags,deploy/sync.envvars, dump defaults, live refuse, and console rewrite stay the same.Closes #21 (parent: #12). Host/CD stays bash. Dump remains
shopware-cli project dump; restore stays MySQL client. Console is only forfyrst:sales-channel:rewrite-urls.Module map
deploy/sync-runtime.shparses args and dispatchessnapshot|restore|sync|help. It sourcesdeploy/lib/sync.sh, which loads:identity.shSHOPWARE_SHOP_ID/ env → data root + project name)compose.shCOMPOSE/COMPOSE_STRsync-log.shlog/die/ CSV /require_cmdsync-identity.shSYNC_DATA_ROOT, project-name fallback)sync-dump.shsync-rewrite.shfyrst:sales-channel:rewrite-urlsgluesync-live.shsync-ssh.shremote_bash, SSH probesync-db.shsync-volumes.shsync-app.shcache:clear, post-restore hintssync-commands.shPhase 2
backup-runtime.shstill callssync-runtime.sh snapshot(same public path). Identity/compose come fromlib/vps-common.sh, which now sourcesidentity.sh/compose.sh.vps-release.sh/vps-rollback.share unchanged as scripts; they pick up the shared helpers viavps-common.shwithout rewriting rollout logic.Tests
New checks: SoT path derive, live restore refuse,
--datanormalize,--help/ missing command, stagingsnapshot --dry-run(mock docker when no daemon). Libs and entrypoints arebash -n/ shellcheck clean.Operator surface
Cron one-liner unchanged:
Do not invoke
deploy/lib/*from cron.sync-runtime.mdnotes that helpers live underdeploy/lib/.recipes-contrib
add-fyrst-shopware-cdstill exists (symfony/recipes-contrib#2049). This agent could not push the overlay (403 fromcursor[bot]onfyrst-dev/recipes-contrib). Mirror from this PR’sdeploy/sync-runtime.sh+deploy/lib/(exceptvps-common.sh, which that tree does not wire yet).