Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nightly/ prefix for OS images #13

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading