fix: publisher - create versions file correctly #52
2 changed files with 5 additions and 1 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue