refactor(dependencies): extract ansible bash scripts via go:embed - #283
Merged
patrick-hermann-sva merged 1 commit intoMay 28, 2026
Merged
Conversation
Moves the two large embedded bash blobs in `dependencies/ansible.go` into standalone files under `dependencies/scripts/` and loads them via `//go:embed`. Behavior is unchanged — the scripts are byte-for- byte the same as the previous string literals. Result: - ansible.go: 314 LOC → 136 LOC - scripts/check-ansible-updates.sh: 100 LOC (was inline in UpdateAnsibleRequirements) - scripts/update-ansible-requirements.sh: 81 LOC (was inline in UpdateAnsibleRequirementsAndApply) The update script keeps the `UPDATE_ALL=%v` / `COLLECTIONS_TO_UPDATE=(%s)` placeholders so `fmt.Sprintf` still wires Go state in at runtime. Side benefit: the bash is now lintable with shellcheck. Refs #262 (P3 — split oversized files; `dependencies/ansible.go` slice). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
patrick-hermann-sva
temporarily deployed
to
linting
May 28, 2026 07:28 — with
GitHub Actions
Inactive
patrick-hermann-sva
deleted the
refactor/dependencies-extract-ansible-scripts
branch
May 28, 2026 07:31
11 tasks
Contributor
Author
|
🎉 This PR is included in version 0.115.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Moves the two large embedded bash blobs in
dependencies/ansible.gointo standalone files underdependencies/scripts/, loaded via//go:embed. Behavior unchanged.dependencies/ansible.godependencies/scripts/check-ansible-updates.shdependencies/scripts/update-ansible-requirements.shThe update script preserves the
UPDATE_ALL=%v/COLLECTIONS_TO_UPDATE=(%s)placeholders sofmt.Sprintfstill wires Go state in at runtime.Refs #262 — P3 "Split oversized files:
dependencies/ansible.go". Completes the last remaining item under that checkbox.Side benefit
The two scripts are now lintable with shellcheck and editable with proper bash tooling (syntax highlighting, format on save, etc).
Test plan
go build ./...cleango vet ./...cleangofmt -l .cleandagger functions -m ./dependencieslists the same 4 functions with identical descriptionsapply-ansible-updatesagainst a real requirements.yaml — recommend smoke-testing before merge since the bash blobs aren't exercised bydagger functions🤖 Generated with Claude Code