You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
publish can publish source that differs from the release tag #104
verwalter publish checks only that the tag for a package's current version exists (git::ref_exists in candidates(), src/publish.rs). It does not check that the checked-out source is the tagged source.
A run by hand (workflow_dispatch) without a ref input checks out the branch head. If a commit after the release changed a package but not its version, publish builds that newer source. It uploads the newer source under the released version. The registry then has source that the tag does not have.
Reproduce (v0.30.0)
Release a package. The tag pkg-v1.2.0 points at commit A.
Merge a change to the files of pkg without a changeset. Commit B still has version 1.2.0.
On B, run verwalter release --dry-run --package pkg, then verwalter publish --dry-run.
publish reports dry-run for pkg and names its publish command. Without --dry-run, it publishes the source of B as 1.2.0.
Where it came up
livekit/node-sdks#784 adds a workflow_dispatch trigger to its release workflow for recovery. As a workaround, the workflow runs git diff --quiet <tag> HEAD -- <package dir> for each package that the run publishes. Every repository that uses verwalter has the same gap, so the check belongs in verwalter.
Proposal
Before the publish command of a package runs, compare the files of the package at its tag with HEAD. If they differ, do not run the command. Report the package as failed, with a reason that names ref=<tag>. Its dependents are blocked, as for any other failure. A version that the registry already has is skipped before the check, because publish does not run its command anyway.
docs/features.md already tells a run by hand to set ref to the release tag. The check makes publish enforce it.
Activity
Fail a publish whose source changed since its tag (#105)