Add local source publication

This commit is contained in:
2026-05-31 02:21:36 +00:00
parent aeee91940d
commit e296361042
17 changed files with 1019 additions and 84 deletions

View File

@@ -0,0 +1,19 @@
package publish
import (
"context"
"fmt"
"gitea.maximumdirect.net/eric/distributor/internal/storage"
)
func ensureDestinationEmpty(ctx context.Context, backend storage.Backend, bundlePath string) error {
hasAny, err := backend.HasAny(ctx, bundlePath)
if err != nil {
return err
}
if hasAny {
return fmt.Errorf("destination bundle path %q is not empty after managed cleanup", displayPath(bundlePath))
}
return nil
}