Skip to content

Commit

Permalink
Bugfix in openwrt-http.go to handle 23.x ARM release
Browse files Browse the repository at this point in the history
Somehow I got my notes on file naming conventions mixed up for ARM, which in 23.x matches snapshot (i.e., no "default").

Signed-off-by: Thomas Winkler <[email protected]>
  • Loading branch information
tew42 authored Oct 17, 2023
1 parent 04f5021 commit 11b7e66
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sources/openwrt-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,24 @@ func (s *openwrt) Run() error {

var fname string

if release == "snapshot" {
if strings.HasPrefix(release, "21.02") || strings.HasPrefix(release, "22.03") {
switch s.definition.Image.ArchitectureMapped {
case "x86_64":
fallthrough
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
case "armv7l":
fallthrough
case "aarch64":
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
fname = fmt.Sprintf("openwrt-%s%s-default-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
}
} else {

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-20.04)

syntax error: unexpected else at end of statement) (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-20.04)

syntax error: unexpected else at end of statement (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-20.04)

expected ';', found 'else' (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-22.04)

syntax error: unexpected else at end of statement) (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-22.04)

syntax error: unexpected else at end of statement (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.20.x, ubuntu-22.04)

expected ';', found 'else' (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

syntax error: unexpected else at end of statement) (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

syntax error: unexpected else at end of statement (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-20.04)

expected ';', found 'else' (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

syntax error: unexpected else at end of statement) (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

syntax error: unexpected else at end of statement (typecheck)

Check failure on line 88 in sources/openwrt-http.go

View workflow job for this annotation

GitHub Actions / Code tests (1.21.x, ubuntu-22.04)

expected ';', found 'else' (typecheck)
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%s-default-rootfs.tar.gz", releaseInFilename,
fname = fmt.Sprintf("openwrt-%s%s-rootfs.tar.gz", releaseInFilename,
strings.Replace(architecturePath, "/", "-", 1))
}
}
Expand Down

0 comments on commit 11b7e66

Please sign in to comment.