Feature request: support dynamically setting top-level `version` during build
Metadata
Current evaluation
Dynamic version updates are already supported: rockcraft exposes the top-level version as a craft-parts project variable that craftctl can update during the build.
Suggested action: close resolved
Reason: Rockcraft commit f56e7f6e0779bc398452d3c22b47bc61175e3c6a already verifies that version is passed to LifecycleManager as a project variable. Craft-application commit 7a3a66a34d19b83ce51da485cbd7ed4b17ff29f0 creates these variables, and craft-parts commit aa26742f9be31651a3ac43d87c10c2a703bda909 implements craftctl set for them.
Evaluated by: mr-cal-bot
Impact:
48
Quick Win:
34
Complexity:
15
Confidence:
91
Actionability:
84
Issue body
### Check existing issues
- [x] I've verified that this request isn't described by any existing issues.
### Request
### **Feature Request**
We would like a mechanism (for example via `craftctl set version`) to **dynamically update the top-level `version:` field** in `rockcraft.yaml` during the build.
Currently, the top-level `version:` field is static, and there is no supported way to override it dynamically. Being able to set it during the build would allow the rock version to be computed from a combination of upstream workload version plus packaging increment (rock revision).
### The problem it solves
### **Problem / Use Case**
Suppose we are packaging Mattermost 10.11.6 with a local packaging increment (rock revision 1). We define the version in a single external file or CI variable:
```bash
# version.env
WORKLOAD_VERSION=10.11.6
ROCK_REV=1
ROCK_VERSION="${WORKLOAD_VERSION}-${ROCK_REV}"
```
During the build, we dynamically set the top-level rock version and reference the workload version in all parts:
```bash
# dynamically set top-level version
craftctl set version=$ROCK_VERSION
```
```yaml
parts:
backend:
source: https://releases.mattermost.com/$WORKLOAD_VERSION/mattermost-$WORKLOAD_VERSION-linux-amd64.tar.gz
webapp:
source-tag: v$WORKLOAD_VERSION
```
Benefits:
* The **workload version is defined once**, outside the rock
* The **top-level version automatically includes the rock revision**
* All parts reference the workload version consistently, avoiding duplication
* Incrementing the rock revision produces a new rock version without changing upstream references
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
34
Complexity:
15
Confidence:
91
Actionability:
84
|
close resolved | Dynamic version updates are already supported: rockcraft exposes the top-level version as a craft-parts project variable that craftctl can update during the build. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
11
Complexity:
62
Confidence:
91
Actionability:
67
|
needs triage | Requests a build-time mechanism to set rockcraft.yaml's top-level version from CI-derived workload and packaging revisions; it remains open and untriaged. | |
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
11
Complexity:
68
Confidence:
89
Actionability:
73
|
needs triage | Requests a build-time mechanism such as `craftctl set version` to derive the rock version from CI data; the capability remains unimplemented and untriaged. | |
| qwen/qwen3.6-35b-a3b |
Impact:
30
Quick Win:
14
Complexity:
40
Confidence:
70
Actionability:
80
|
needs triage | Feature request to allow dynamically setting the top-level version field in rockcraft.yaml during build via craftctl | |
| qwen/qwen3.8-27b |
Impact:
45
Quick Win:
27
Staleness:
55
Complexity:
40
Confidence:
60
Support Request:
10
|
needs triage | Feature request to allow dynamically setting the top-level version field in rockcraft.yaml during build, enabling rock versions computed from workload version plus packaging increment. No maintainer response yet. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
65
Complexity:
65
Confidence:
85
Support Request:
5
|
needs triage | Feature request to dynamically set the top-level version in rockcraft.yaml during build via craftctl. Currently unlabelled and inactive for 123 days with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
65
Confidence:
85
Support Request:
10
|
needs triage | Feature request to dynamically set the top-level version field in rockcraft.yaml during build via craftctl. Currently unlabelled, inactive for 109 days with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
70
Complexity:
50
Confidence:
90
Support Request:
10
|
needs triage | Feature request to dynamically set the top-level version field in rockcraft.yaml during build via craftctl. Currently static. Untriaged with no maintainer response after 106 days. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.