vendor: update to buildkit v0.13.0

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2024-03-05 08:53:44 -08:00
parent 0c0dcb7c8c
commit 849456c198
5 changed files with 19 additions and 16 deletions

View File

@ -27,7 +27,7 @@ func DefaultPathEnv(os string) string {
// NormalizePath cleans the path based on the operating system the path is meant for.
// It takes into account a potential parent path, and will join the path to the parent
// if the path is relative. Additionally, it will apply the folliwing rules:
// if the path is relative. Additionally, it will apply the following rules:
// - always return an absolute path
// - always strip drive letters for Windows paths
// - optionally keep the trailing slashes on paths

View File

@ -43,13 +43,14 @@ type sendHandle struct {
}
type sender struct {
conn Stream
fs FS
files map[uint32]string
mu sync.RWMutex
progressCb func(int, bool)
progressCurrent int
sendpipeline chan *sendHandle
conn Stream
fs FS
files map[uint32]string
mu sync.RWMutex
progressCb func(int, bool)
progressCurrent int
progressCurrentMu sync.Mutex
sendpipeline chan *sendHandle
}
func (s *sender) run(ctx context.Context) error {
@ -112,6 +113,8 @@ func (s *sender) run(ctx context.Context) error {
func (s *sender) updateProgress(size int, last bool) {
if s.progressCb != nil {
s.progressCurrentMu.Lock()
defer s.progressCurrentMu.Unlock()
s.progressCurrent += size
s.progressCb(s.progressCurrent, last)
}