Skip to content

Commit

Permalink
POC - Process all releases
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPatrck committed Oct 30, 2024
1 parent bd4da18 commit 3ce1614
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions metascoop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ func main() {

fmt.Printf("::group::App %s\n", app.Name)

foundArtifact := false

for _, release := range releases {
fmt.Printf("::group::Release %s\n", release.GetTagName())

Expand Down Expand Up @@ -146,8 +144,7 @@ func main() {
// If the app file already exists for this version, we stop processing this app and move to the next
if _, err := os.Stat(appTargetPath); !errors.Is(err, os.ErrNotExist) {
log.Printf("Already have APK for version %q at %q\n", release.GetTagName(), appTargetPath)
foundArtifact = true
break
continue
}

log.Printf("Downloading APK %q from release %q to %q", apk.GetName(), release.GetTagName(), appTargetPath)
Expand Down Expand Up @@ -183,9 +180,8 @@ func main() {
}
changedRepos[repo.GitURL][app.Filename] = release
mu.Unlock()
break
}
if foundArtifact || haveError {
if haveError {
// Stop after the first [release] of this [app] is downloaded to prevent back-filling legacy releases.
return
}
Expand Down

0 comments on commit 3ce1614

Please sign in to comment.