Skip to content

Commit 37661ae

Browse files
lng2020GiteaBot
authored andcommitted
Fix alpine package files are not rebuilt (go-gitea#28638)
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?
1 parent 2165729 commit 37661ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/packages/cleanup/cleanup.go

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
packages_module "code.gitea.io/gitea/modules/packages"
1616
"code.gitea.io/gitea/modules/util"
1717
packages_service "code.gitea.io/gitea/services/packages"
18+
alpine_service "code.gitea.io/gitea/services/packages/alpine"
1819
cargo_service "code.gitea.io/gitea/services/packages/cargo"
1920
container_service "code.gitea.io/gitea/services/packages/container"
2021
debian_service "code.gitea.io/gitea/services/packages/debian"
@@ -122,6 +123,10 @@ func ExecuteCleanupRules(outerCtx context.Context) error {
122123
if err := debian_service.BuildAllRepositoryFiles(ctx, pcr.OwnerID); err != nil {
123124
return fmt.Errorf("CleanupRule [%d]: debian.BuildAllRepositoryFiles failed: %w", pcr.ID, err)
124125
}
126+
} else if pcr.Type == packages_model.TypeAlpine {
127+
if err := alpine_service.BuildAllRepositoryFiles(ctx, pcr.OwnerID); err != nil {
128+
return fmt.Errorf("CleanupRule [%d]: alpine.BuildAllRepositoryFiles failed: %w", pcr.ID, err)
129+
}
125130
}
126131
}
127132
return nil

0 commit comments

Comments
 (0)