more appropriate function name
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Steven Polley 2023-06-30 20:14:34 -06:00
parent 75668ad531
commit 238dab70fe
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ func updateROMCache() {
for i, v := range files {
isLineageROM, splitName := isLineageROMZip(v)
isLineageROM, splitName := parseROMFileName(v)
if !isLineageROM {
continue
}

View File

@ -30,7 +30,7 @@ func moveBuildArtifacts() bool {
var newROMs bool
for _, v := range files {
if isLineageROM, _ := isLineageROMZip(v); !isLineageROM { // skip files that aren't LineageOS ROMs
if isLineageROM, _ := parseROMFileName(v); !isLineageROM { // skip files that aren't LineageOS ROMs
continue
}
@ -68,7 +68,7 @@ func hashFile(filename string) (string, error) {
// no formal validation is performed - only file naming convention is checked
// also returns a lineage ROM's filename sliced and delimited by -'s
// Example filename: lineage-20.0-20230604-UNOFFICIAL-sunfish.zip
func isLineageROMZip(v fs.DirEntry) (bool, []string) {
func parseROMFileName(v fs.DirEntry) (bool, []string) {
// skip directories, non .zip files and files that don't begin with lineage-
if v.Type().IsDir() || !strings.HasSuffix(v.Name(), ".zip") || !strings.HasPrefix(v.Name(), "lineage-") {