Skip to content

Commit

Permalink
Merge branch 'lxc:main' into openwrt-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tew42 authored Oct 17, 2023
2 parents f3b5b7e + 04f5021 commit 1a3ab9f
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions sources/openwrt-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ func (s *openwrt) Run() error {
case "x86_64":
architecturePath = strings.Replace(s.definition.Image.ArchitectureMapped, "_", "/", 1)
case "armv7l":
if release == "snapshot" {
architecturePath = "armsr/armv7"
} else {
if strings.HasPrefix(release, "21.02") || strings.HasPrefix(release, "22.03") {
architecturePath = "armvirt/32"
} else {
architecturePath = "armsr/armv7"
}

case "aarch64":
if release == "snapshot" {
architecturePath = "armsr/armv8"
} else {
if strings.HasPrefix(release, "21.02") || strings.HasPrefix(release, "22.03") {
architecturePath = "armvirt/64"
} else {
architecturePath = "armsr/armv8"
}
}

Expand Down Expand Up @@ -78,25 +78,18 @@ func (s *openwrt) Run() error {
if release == "snapshot" {
switch s.definition.Image.ArchitectureMapped {
case "x86_64":
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
fallthrough
case "armv7l":
fallthrough
case "aarch64":
fname = fmt.Sprintf("openwrt-%s-rootfs.tar.gz",
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
}
} else {
switch s.definition.Image.ArchitectureMapped {
case "x86_64":
if strings.HasPrefix(release, "21.02") || strings.HasPrefix(release, "22.03") || strings.HasPrefix(release, "23.05") {
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
} else {
fname = fmt.Sprintf("openwrt-%s%s-generic-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
}

fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
case "armv7l":
fallthrough
case "aarch64":
Expand Down

0 comments on commit 1a3ab9f

Please sign in to comment.