From 82c654f3ba07f1b422e02e00e45a341813e35bb0 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 12 Feb 2026 12:03:14 +0000 Subject: [PATCH] fix: publisher - create versions file correctly (#52) ## Description relates to #1234 ## Checklist - [ ] Issue was linked above - [ ] Code format was applied: `make fmt` - [ ] Examples were added / adjusted (see `examples/` directory) - [x] Docs are up-to-date: `make generate-docs` (will be checked by CI) - [ ] Unit tests got implemented or updated - [ ] Acceptance tests got implemented or updated (see e.g. [here](https://github.com/stackitcloud/terraform-provider-stackit/blob/f5f99d170996b208672ae684b6da53420e369563/stackit/internal/services/dns/dns_acc_test.go)) - [x] Unit tests are passing: `make test` (will be checked by CI) - [x] No linter issues: `make lint` (will be checked by CI) Reviewed-on: https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/pulls/52 Co-authored-by: Marcel S. Henselin Co-committed-by: Marcel S. Henselin --- cmd/cmd/publish/provider.go | 2 +- cmd/cmd/publish/versions.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/cmd/publish/provider.go b/cmd/cmd/publish/provider.go index d581fbe3..36d7af1d 100644 --- a/cmd/cmd/publish/provider.go +++ b/cmd/cmd/publish/provider.go @@ -143,7 +143,7 @@ func (p *Provider) createVersionsFile() error { // Build the versions file... version := Version{ Version: p.Version, - Protocols: []string{"5.1", "6.0"}, + Protocols: []string{"5.1", "6.1"}, Platforms: nil, } for _, sum := range shasums { diff --git a/cmd/cmd/publish/versions.go b/cmd/cmd/publish/versions.go index 4145612a..397afa15 100644 --- a/cmd/cmd/publish/versions.go +++ b/cmd/cmd/publish/versions.go @@ -22,10 +22,14 @@ type Platform struct { } type Data struct { + Id string `json:"id,omitempty"` Versions []Version `json:"versions"` } func (d *Data) WriteToFile(filePath string) error { + // TODO: make it variable + d.Id = "tfregistry.sysops.stackit.rocks/mhenselin/stackitprivatepreview" + jsonString, err := json.Marshal(d) if err != nil { return fmt.Errorf("error encoding data: %w", err)