fix: publisher - create versions file correctly #52

Merged
marcel.henselin merged 1 commit from fix/publisher into alpha 2026-02-12 12:03:15 +00:00
2 changed files with 5 additions and 1 deletions

View file

@ -143,7 +143,7 @@ func (p *Provider) createVersionsFile() error {
// Build the versions file... // Build the versions file...
version := Version{ version := Version{
Version: p.Version, Version: p.Version,
Protocols: []string{"5.1", "6.0"}, Protocols: []string{"5.1", "6.1"},
Platforms: nil, Platforms: nil,
} }
for _, sum := range shasums { for _, sum := range shasums {

View file

@ -22,10 +22,14 @@ type Platform struct {
} }
type Data struct { type Data struct {
Id string `json:"id,omitempty"`
Versions []Version `json:"versions"` Versions []Version `json:"versions"`
} }
func (d *Data) WriteToFile(filePath string) error { func (d *Data) WriteToFile(filePath string) error {
// TODO: make it variable
d.Id = "tfregistry.sysops.stackit.rocks/mhenselin/stackitprivatepreview"
jsonString, err := json.Marshal(d) jsonString, err := json.Marshal(d)
if err != nil { if err != nil {
return fmt.Errorf("error encoding data: %w", err) return fmt.Errorf("error encoding data: %w", err)