Skip to content

Commit aa5119e

Browse files
committed
fix(manifest): add version field to generated manifests
1 parent 2b1bc00 commit aa5119e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • scripts/generate-manifests-from-r2

scripts/generate-manifests-from-r2/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type ManifestDownload struct {
3636

3737
// Manifest represents the output manifest structure
3838
type Manifest struct {
39+
Version int `json:"version"`
3940
Versions map[string]map[string]*ManifestDownload `json:"versions"`
4041
}
4142

@@ -138,6 +139,7 @@ func createS3Client() (*s3.Client, error) {
138139

139140
func generateManifest(client *s3.Client, runtime string) (*Manifest, error) {
140141
manifest := &Manifest{
142+
Version: 1,
141143
Versions: make(map[string]map[string]*ManifestDownload),
142144
}
143145

@@ -259,6 +261,7 @@ func getExtension(url string) string {
259261
func writeManifest(manifest *Manifest, path string) error {
260262
// Sort versions for consistent output
261263
sortedManifest := &Manifest{
264+
Version: manifest.Version,
262265
Versions: make(map[string]map[string]*ManifestDownload),
263266
}
264267

0 commit comments

Comments
 (0)