Fix URL and ignore non .zip files
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a7c8db338c
commit
62722871e7
5
main.go
5
main.go
@ -68,7 +68,8 @@ func getLineageOSROMs(romDirectory string) ([]LineageOSROM, error) {
|
|||||||
|
|
||||||
splitName := strings.Split(d.Name(), "-")
|
splitName := strings.Split(d.Name(), "-")
|
||||||
if len(splitName) != 5 {
|
if len(splitName) != 5 {
|
||||||
log.Printf("ignoring zip file '%d', name is not formatted correctly ")
|
log.Printf("ignoring zip file '%s', name is not formatted correctly", d.Name())
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
lineageOSROM := LineageOSROM{
|
lineageOSROM := LineageOSROM{
|
||||||
@ -77,7 +78,7 @@ func getLineageOSROMs(romDirectory string) ([]LineageOSROM, error) {
|
|||||||
ID: "TBD",
|
ID: "TBD",
|
||||||
Romtype: "nightly",
|
Romtype: "nightly",
|
||||||
Size: int(fInfo.Size()),
|
Size: int(fInfo.Size()),
|
||||||
URL: fmt.Sprintf("https://lineageos-updater.deadbeef.codes/public/%s", d.Name()),
|
URL: fmt.Sprintf("https://lineageos-ota.deadbeef.codes/public/%s", d.Name()),
|
||||||
Version: "TBD",
|
Version: "TBD",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user