Repository navigation
Apply a forced --version-bump to the version ci publishes - #159
Merged
Merged
Conversation
ci takes the version it writes to VERSION.md, packs and tags from the metadata stage, but only the version gate received the forced bump. A run with --version-bump major on top of v1.2.3 and a fix released 1.2.4, and a forced bump with no new commits kept 1.2.3 while the gate stayed open, so the release failed on the existing tag. Carry the forced type on MetadataUpdateOptions and have the metadata stage pass it to the version calculator, so metadata and the gate agree. Fixes #152 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EmfGBmvKNA36fj7HFaVgb
Drive the ci handler with --version-bump major against a substituted process runner and assert VERSION.md carries the bumped version. This covers the CiCommand wiring, which the PipelineService tests cannot reach. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EmfGBmvKNA36fj7HFaVgb
|
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.



Fixes #152
Problem
citakes its version from the metadata stage. That version goes into VERSION.md, the packages, the changelog and the tag.MetadataService.UpdateAllAsynccalledGetVersionInfoAsyncwithout the forced type, so--version-bumponly reachedResolveVersionAsync, which is the release gate.v1.2.3plus one fix, run with--version-bump major: it released 1.2.4.v1.2.3, run with--version-bump minor: metadata computed Skip and kept 1.2.3, the forced gate stayed open, and the release failed with "Failed to create tag".Change
MetadataUpdateOptions.ForcedVersionTypeis new, andMetadataServicepasses it to the version calculator.PipelineService.UpdateMetadataAsync(context, versionBump, cancellationToken)now takes the bump, parses it the same wayResolveVersionAsyncdoes, and passes it to metadata.CiCommandpassesoptions.VersionBumpto both stages, so metadata and the gate agree.ApplyResolvedVersionremarks described this divergence as expected. I've reworded them.This is a breaking change to the public signature of
PipelineService.UpdateMetadataAsync.CiCommandwas its only caller. I dropped the old two-argument overload instead of keeping it, because leaving it in place would let a caller silently skip the bump again.Tests (PipelineServiceTests)
UpdateMetadataWritesTheForcedVersionBumpcovers major → 4.0.0, minor → 3.11.0 and patch → 3.10.1 fromv3.10.0. It checks the metadata result,Configuration.Versionand VERSION.md.ForcedBumpWithNoNewCommitsPublishesTheBumpedVersionThatTheGateApprovescovers scenario B: the version is 3.11.0, the gate is open, and metadata agrees with the gate.UpdateMetadataDetectsTheIncrementWhenNoBumpIsForcedchecks thatautobehaves as before.With the
MetadataServicechange reverted, the major, minor and no-new-commits cases fail. With it, the full suite passes (748/748). This PR merges cleanly with #158 (the #153 fix), which also touchesPipelineServiceTests.🤖 Generated with Claude Code
https://claude.ai/code/session_011EmfGBmvKNA36fj7HFaVgb
Generated by Claude Code