Skip to content

Commit cf2dcd3

Browse files
committed
Change versioning scheme
We have to move away from using a semantic version with build information (e.g. `v0.1.0+build12`) because this is not supported by OCI tag rules. Because of that, we have to use the pre-release section (e.g.`v0.1.0-rc1`). Signed-off-by: Flavio Castelli <[email protected]>
1 parent 9f1073b commit cf2dcd3

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "deprecated-api-versions"
3-
version = "0.1.0+k8sv1.26.0"
3+
version = "0.1.0-k8sv1.26.0"
44
authors = ["Flavio Castelli <[email protected]>"]
55
edition = "2018"
66

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ added this policy will be updated.
5757
The versioning scheme of this policy follows this pattern:
5858

5959
```
60-
<policy version>+k8sv<most recent version of kubernes known by the embedded deprecation rules>
60+
<policy version>-k8sv<most recent version of kubernes known by the embedded deprecation rules>
6161
```
6262

63-
For example, the release `0.1.0+k8sv1.26.0` of this policy knows about all the deprecation rules
63+
For example, the release `0.1.0-k8sv1.26.0` of this policy knows about all the deprecation rules
6464
formulated up to Kubernetes release 1.26.0.
6565

6666
The announcement of new deprecation rules for Kubernetes 1.27.0 would trigger
67-
then a release of this policy with the following version: `v0.1.1+k8sv1.27.0`.
67+
then a release of this policy with the following version: `v0.1.1-k8sv1.27.0`.

artifacthub-pkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: "0.1.0+k8sv1.26.0"
2+
version: "0.1.0-k8sv1.26.0"
33
name: deprecated-api-versions
44
displayName: Deprecated API Versions
55
createdAt: '2022-11-03T16:39:10+02:00'

crates/policy-version-helper/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ pub fn main() {
4848
let current_policy_version = find_policy_version(&cli.manifest_path);
4949

5050
let build_version =
51-
semver::BuildMetadata::new(format!("k8sv{}", most_recent_k8s_version).as_str())
51+
semver::Prerelease::new(format!("k8sv{}", most_recent_k8s_version).as_str())
5252
.expect("Cannot create new build metadata");
5353
let expected_policy_version = semver::Version {
54-
build: build_version,
54+
pre: build_version,
5555
..current_policy_version.clone()
5656
};
5757

metadata.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ annotations:
213213
The versioning scheme of this policy follows this pattern:
214214
215215
```
216-
<policy version>+k8sv<most recent version of kubernes known by the embedded deprecation rules>
216+
<policy version>-k8sv<most recent version of kubernes known by the embedded deprecation rules>
217217
```
218218
219-
For example, the release `0.1.0+k8sv1.26.0` of this policy knows about all the deprecation rules
219+
For example, the release `0.1.0-k8sv1.26.0` of this policy knows about all the deprecation rules
220220
formulated up to Kubernetes release 1.26.0.
221221
222222
The announcement of new deprecation rules for Kubernetes 1.27.0 would trigger
223-
then a release of this policy with the following version: `v0.1.1+k8sv1.27.0`.
223+
then a release of this policy with the following version: `v0.1.1-k8sv1.27.0`.

0 commit comments

Comments
 (0)