Repository navigation
Support plugin and core same repo - #644
Open
pablocampogo wants to merge 2 commits into
Open
pablocampogo wants to merge 2 commits into
pablocampogo wants to merge 2 commits into
Conversation
This branch has not been deployed
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
The auto-updater previously assumed a repo published a single kind of release. In a repo that ships both core (CLI) and plugin releases, the plugin stream could pick up the wrong release, and nothing enforced that versions only move forward. This PR makes plugin selection deterministic via a dedicated rolling tag and adds a per-stream monotonic version gate. Core release output (tags, names, assets, checksums) is intentionally unchanged.
Changes
Plugin release workflows (
.github/workflows/release-plugin-*.yml)latest-plugin, reusing the same assets. The actual version is embedded in the release name (e.g.plugin-go-v1.0.0) so freshness is still discoverable via the API.plugin-go-v1.0.0) is retained unchanged, so validators still on the old auto-updater keep working while they're migrated.make_latest: falseto the per-version release step so the repo's "Latest" badge stays on the newest core release rather than being stolen by a plugin release.Auto-updater (
cmd/auto-update/releaser.go)GET /repos/{owner}/{repo}/releases/tags/latest-plugin— and reads the version from the release name instead of scanning/guessing across all releases. Added apluginReleaseTagconstant and aNamefield on the release struct. The existingShouldUpdate/semver comparison is reused as-is.Version gate (
cmd/scripts/semver/main.go)--stream core|pluginflag. When set, the script enforces that the incoming version is strictly greater than the current released version for that stream:corecompares against/releases/latest(the core tag).plugincompares against thelatest-pluginrelease name.404(no prior release) is treated as "allowed" so the first release of a stream passes. Version normalization tolerates input with or without a leadingv. Without--streamthe script stays fully offline, so the frontend build is unaffected.--stream+GITHUB_TOKENinto the validate steps of the core (release.yml) and all plugin workflows.Compatibility
Testing
go test ./cmd/auto-update/... ./cmd/scripts/semver/...