Skip to content

Commit

Permalink
add nightly/ prefix for OS images
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn authored and igorpecovnik committed Aug 11, 2024
1 parent 0b6be77 commit 362c939
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {

var sb strings.Builder

if file.Repository == "os" {
sb.WriteString("nightly/")
}

sb.WriteString(file.BoardSlug)
sb.WriteString("/")
sb.WriteString(distroCaser.String(file.DistroRelease))
Expand Down Expand Up @@ -147,6 +151,7 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {
sb.WriteString("-oowow")
}

// Add board into the map without an extension
if strings.HasSuffix(file.Extension, "img.xz") {
m[sb.String()] = u.Path
}
Expand All @@ -163,7 +168,7 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {
sb.WriteString(file.Extension)
}

m[sb.String()] = u.Path
m[sb.String()] = u.Path // Add board into the map with an extension
}

return m, nil
Expand Down

0 comments on commit 362c939

Please sign in to comment.