aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-12-31 14:18:26 +0800
committerGitHub <noreply@github.com>2023-12-31 06:18:26 +0000
commit3e1bd61000ca47e2a990032c3b3817d930c9eb3f (patch)
tree4813faf7e233c6ea108713f50c4465f035125f45
parent18da3f8483d5359f44bdac5ea46c6d2a54d94358 (diff)
downloadgitea-3e1bd61000ca47e2a990032c3b3817d930c9eb3f.tar.gz
gitea-3e1bd61000ca47e2a990032c3b3817d930c9eb3f.zip
Fix alpine package files are not rebuilt (#28638) (#28665)
Backport #28638 by @lng2020 I noticed the `BuildAllRepositoryFiles` function under the Alpine folder is unused and I thought it was a bug. But I'm not sure about this. Was it on purpose? Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
-rw-r--r--services/packages/cleanup/cleanup.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/packages/cleanup/cleanup.go b/services/packages/cleanup/cleanup.go
index 9bdd9d6aad..04ee6c4419 100644
--- a/services/packages/cleanup/cleanup.go
+++ b/services/packages/cleanup/cleanup.go
@@ -15,6 +15,7 @@ import (
packages_module "code.gitea.io/gitea/modules/packages"
"code.gitea.io/gitea/modules/util"
packages_service "code.gitea.io/gitea/services/packages"
+ alpine_service "code.gitea.io/gitea/services/packages/alpine"
cargo_service "code.gitea.io/gitea/services/packages/cargo"
container_service "code.gitea.io/gitea/services/packages/container"
debian_service "code.gitea.io/gitea/services/packages/debian"
@@ -122,6 +123,10 @@ func ExecuteCleanupRules(outerCtx context.Context) error {
if err := debian_service.BuildAllRepositoryFiles(ctx, pcr.OwnerID); err != nil {
return fmt.Errorf("CleanupRule [%d]: debian.BuildAllRepositoryFiles failed: %w", pcr.ID, err)
}
+ } else if pcr.Type == packages_model.TypeAlpine {
+ if err := alpine_service.BuildAllRepositoryFiles(ctx, pcr.OwnerID); err != nil {
+ return fmt.Errorf("CleanupRule [%d]: alpine.BuildAllRepositoryFiles failed: %w", pcr.ID, err)
+ }
}
}
return nil