Skip to content

Commit b465a8e

Browse files
Copilotv1v
andauthored
fix(opentofu): use semver versionFilter instead of latest (#203)
* Initial plan * fix: use semver versionFilter for opentofu version policy Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> * chore: bump opentofu policy to 0.2.0 and update CONTRIBUTING docs Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
1 parent 0c196e3 commit b465a8e

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ The version will be used as the "tag" for the policy such as `ghcr.io/updatecli/
3333

3434
Any change to the policy code must be reflected by a new version. Policies are automatically published on `ghcr.io` if the version is updated.
3535

36+
When submitting a new feature, bug fix, or enhancement to an existing policy, you **must** update both:
37+
38+
- `Policy.yaml`: bump the `version` field following semantic versioning:
39+
- **Patch** (`x.y.Z`): backwards-compatible bug fixes
40+
- **Minor** (`x.Y.0`): new backwards-compatible features or enhancements
41+
- **Major** (`X.0.0`): breaking changes
42+
- `CHANGELOG.md`: add a new section at the top for the new version describing what changed.
43+
3644
## How to test this?
3745

3846
### locally
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.2.0
4+
5+
- Use semver versionFilter instead of latest to ensure proper semantic version ordering
6+
37
## 0.1.0
48

59
- Initial release

updatecli/policies/opentofu/version/Policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ url: "https://github.com/elastic/oblt-updatecli-policies/"
55
changelog: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/opentofu/version/CHANGELOG.md"
66
documentation: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/opentofu/version/README.md"
77
source: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/opentofu/version/"
8-
version: 0.1.0
8+
version: 0.2.0
99
vendor: Elastic
1010

1111
licenses:

updatecli/policies/opentofu/version/updatecli.d/default.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sources:
2121
token: "{{ default $GitHubPAT .scm.token }}"
2222
username: "{{ default $GitHubUsername .scm.username }}"
2323
versionFilter:
24-
kind: latest
24+
kind: semver
2525
transformers:
2626
- trimprefix: "v"
2727

0 commit comments

Comments
 (0)