Adjust map.go to support QCOW2 images without .xz

This commit is contained in:
Igor
2025-03-28 09:02:05 +01:00
committed by M. Efe Çetin
parent d5b932a3a3
commit d9a7a5f190

4
map.go
View File

@@ -88,7 +88,7 @@ type ReleaseFile struct {
var distroCaser = cases.Title(language.Und)
var imageExtensions = []string{"img.xz", "img.qcow2.xz", "boot.bin.xz"}
var imageExtensions = []string{"img.xz", "img.qcow2", "boot.bin.xz"}
// loadMapJSON loads a map file from JSON, based on the format specified in the github issue.
// See: https://github.com/armbian/os/pull/129
@@ -144,7 +144,7 @@ func loadMapJSON(f io.Reader) (map[string]string, error) {
sb.WriteString("-boot-csot")
case strings.Contains(file.Extension, "rootfs.img.xz"):
sb.WriteString("-rootfs")
case strings.Contains(file.Extension, "img.qcow2.xz"):
case strings.Contains(file.Extension, "img.qcow2"):
sb.WriteString("-qcow2")
case strings.Contains(file.Extension, "boot.bin.xz"):
sb.WriteString("-uboot-bin")