From 362c9399c7333d6e42630a42998aa638a36c80af Mon Sep 17 00:00:00 2001 From: Muhammed Efe Cetin Date: Sun, 11 Aug 2024 13:52:05 +0300 Subject: [PATCH] add nightly/ prefix for OS images --- map.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/map.go b/map.go index 824e2ab..47e86b2 100644 --- a/map.go +++ b/map.go @@ -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)) @@ -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 } @@ -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