feat(publish): add --version to set metadata.version from the CLI - #4
Merged
Merged
Conversation
… line The Gemara schema leaves metadata.version optional (drafts), but the hub refuses an unversioned bundle and requires the OCI tag to equal metadata.version. A tag-only flag would push bytes and then fail at sync, so --version stamps the value into the body's metadata.version before packing (node-level yaml.v3 edit; comments and key order survive) and the tag is derived from it as before. The flag supersedes the file's value — release pipelines stamp values like 1.0.0-rc1 over whatever the file says — and an override is noted on stderr so the pipeline log shows it. Closes #3 Signed-off-by: Eddie Knight <knight@linux.com>
…002) Signed-off-by: Eddie Knight <knight@linux.com>
3 tasks
sonupreetam
added a commit
to sonupreetam/gemara-publish-action
that referenced
this pull request
Oct 1, 2026
Add optional 'version' input that passes --version to grcli publish, stamping metadata.version from the CLI when the artifact YAML omits it (gemaraproj/grcli#4). When set, the layout tag is known ahead of time and the grep hack is skipped. - Add testdata/minimal-catalog-no-version.yaml fixture - Add version-flag E2E test job in action-test.yml - Update stale grcli#3 references across README, spec, ADR 0004 Ref gemaraproj/grcli#3, gemaraproj/grcli#4
sonupreetam
added a commit
to sonupreetam/gemara-publish-action
that referenced
this pull request
Oct 1, 2026
v0.2.0 includes the --version flag (gemaraproj/grcli#4), which the version input depends on. Unblocks the version-flag CI test job.
sonupreetam
added a commit
to sonupreetam/gemara-publish-action
that referenced
this pull request
Oct 1, 2026
Add optional 'version' input that passes --version to grcli publish, stamping metadata.version from the CLI when the artifact YAML omits it (gemaraproj/grcli#4). When set, the layout tag is known ahead of time and the grep hack is skipped. - Add testdata/minimal-catalog-no-version.yaml fixture - Add version-flag E2E test job in action-test.yml - Update stale grcli#3 references across README, spec, ADR 0004 Ref gemaraproj/grcli#3, gemaraproj/grcli#4 Signed-off-by: sonupreetam <spreetam@redhat.com>
sonupreetam
added a commit
to sonupreetam/gemara-publish-action
that referenced
this pull request
Oct 1, 2026
v0.2.0 includes the --version flag (gemaraproj/grcli#4), which the version input depends on. Unblocks the version-flag CI test job. Signed-off-by: sonupreetam <spreetam@redhat.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.
The Gemara schema leaves metadata.version optional (for situations like unpublished drafts), but the hub refuses an unversioned bundle and requires the OCI tag to equal metadata.version.
A tag-only flag would push bytes and then fail at sync, so --version stamps the value into the body's metadata.version before packing (node-level yaml.v3 edit; comments and key order survive) and the tag is derived from it as before.
The flag supersedes the file's value — release pipelines stamp values like 1.0.0-rc1 over whatever the file says — and an override is noted on stderr so the pipeline log shows it.
Closes #3