← Back to issue list

add a "version" option on charmcraft release cli

View original Github issue

Metadata

Project
charmcraft
Number
#1101
Type
issue
State
closed
Author
gabrielcocenza
Labels
—
Created
Updated
Closed

Current evaluation

Rejected: Charmhub only obtains a charm’s version from the built artifact, so Charmcraft did not add a release version option; metadata-based versioning remains separate work.

Resolution: closed not a bug

Reason: In the closing comment on 2025-09-10, maintainer @lengau explained that adding the requested option was infeasible because Charmhub retrieves the version from the actual charm artifact. No implementation or resolving PR was linked.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Personally, I think it would be great for charm developers if we have an option of passing the charm version in the CLI. This would faciltate the CI/CD and would stop the need of creating a `version` file before using `charmcraft pack`

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Rejected: Charmhub only obtains a charm’s version from the built artifact, so Charmcraft did not add a release version option; metadata-based versioning remains separate work.
stealth/space-bunny-alpha — closed not a bug Rejected as infeasible: Charmhub reads a charm’s version from the built artifact, so no release CLI version option was added. Dynamic metadata-based versioning remains separate.
qwen3.6-35b-a3b-mtp-q6 — — Rejected. The store determines version from the artifact itself, not CLI input. Dynamic version extraction from charm metadata is under separate consideration.
qwen/qwen3.6-35b-a3b — — Rejected as not feasible; the store retrieves version directly from the charm artifact. The team is separately evaluating dynamic metadata inclusion instead.
qwen/qwen3.6-35b-a3b — — Rejected as not feasible. The store retrieves version directly from the charm artifact, making a CLI option unnecessary. Maintainers are separately considering dynamic version extraction from charm metadata.
qwen3.6-35b-a3b-mtp-q6 — — Rejected. The store retrieves versions directly from charm artifacts, making a CLI option unfeasible. Maintainers are exploring dynamic version extraction from charm metadata separately.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#358 How to set the charm version? charmcraft closed Usage question resolved: Charmcraft reads the charm version from a file named "version"; no code fix was needed.
78%
#37 Populate the 'version' file as part of 'charmcraft build' charmcraft closed Automatic version-file generation was rejected; maintainers directed authors to create version in their build pipeline, which Charmcraft preserves in packed charms.
76%
#1790 Set a charm version from `charmcraft.yaml` charmcraft open Maintainer request to accept a `version` field in charmcraft.yaml and store it in the built charm. Unimplemented: the model accepts `version` but it is hidden from the schema and unused. Blocked on design of where version lives.
76%
#1435 `charmcraft release` doesn't use output text from the store. charmcraft open charmcraft release ignores Charmhub's response and prints resource details from CLI arguments, potentially reporting a different revision than was attached; no fix or maintainer response is recorded.
72%
#126 Add a "--release" option to the "upload" command charmcraft closed Implemented charmcraft upload --release in canonical/charmcraft#255 (merge 9064a3f3, feature bc06a62a); #457 added resource support and shipped in Charmcraft 1.1.2.
72%
#8 Have a version in the project, show it in the command and on startup. charmcraft merged Merged PR #8, adding project version metadata and exposing the version through the Charmcraft CLI and startup output; commit 3c4ccc98.
71%