← Back to issue list

Populate the 'version' file as part of 'charmcraft build'

View original Github issue

Metadata

Project
charmcraft
Number
#37
Type
issue
State
closed
Author
jameinel
Labels
Created
Updated
Closed

Current evaluation

Rejected. The team decided against auto-generating a version file due to evolving Juju/Charmhub versioning semantics. Developers must create the file in their build pipeline; charmcraft preserves existing version files during packaging.

Suggested action:

No scores available.

Issue body

When Juju creates a charm .zip file from a directory, one of the steps is to populate the version file: https://github.com/juju/charm/blob/master/charmdir.go#L268 https://github.com/juju/charm/blob/5fe646695e8585e7a6b9fedb0d10cc7fbc598e48/charmdir.go#L521 That allows for a nice way to track back what content is running on a given server, tied back into the source tree that it was generated from.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Rejected. The team decided against auto-generating a version file due to evolving Juju/Charmhub versioning semantics. Developers must create the file in their build pipeline; charmcraft preserves existing version files during packaging.
qwen/qwen3.6-35b-a3b Automatically populating a version file during build was abandoned. Implementation deferred pending Charmhub and Juju versioning design. Developers must manually include the file.
qwen/qwen3.6-35b-a3b Rejected. Auto-generating a version file during build was abandoned due to unresolved Juju and Charmhub versioning semantics. Users should generate it in their build pipeline, as charmcraft preserves existing version files.
qwen3.6-35b-a3b-mtp-q6 Abandoned. The team declined to auto-generate a version file during build, awaiting upstream Charmhub and Juju versioning semantics. Developers should manually include a version file in their build pipeline, which charmcraft preserves.
qwen3.6-35b-a3b-mtp-q6 Automatically populating a version file during build was rejected. The team decided to wait for official Charmhub/Juju versioning semantics before implementation. Users must generate the file in their build pipeline, as charmcraft preserves existing ones. Closed without changes.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1790 Set a charm version from `charmcraft.yaml` charmcraft open Feature request to accept a version field in charmcraft.yaml and store it in the output charm. Open 755 days with no comments or labels; blocked on design decisions about where Juju should read the version from.
73%
#1101 add a "version" option on charmcraft release cli charmcraft closed Rejected. The store determines version from the artifact itself, not CLI input. Dynamic version extraction from charm metadata is under separate consideration.
72%
#358 How to set the charm version? charmcraft closed Closed after a maintainer explained that the charm version is set by creating a file named version containing the desired string. The user confirmed the solution, resolving the question without code changes.
71%