feat(remote): prefix checksums/cached files with the filename (#1636)

* feat(remote): add the task filename in the checksum / cache filename

* prefix the filename with the lastDir from the path
This commit is contained in:
Valentin Maerten
2024-06-28 18:07:43 +02:00
committed by GitHub
parent 46c5eafe35
commit 6012da7a21
5 changed files with 26 additions and 2 deletions

View File

@@ -110,3 +110,8 @@ func (node *HTTPNode) ResolveDir(dir string) (string, error) {
entrypointDir := filepath.Dir(node.Dir())
return filepathext.SmartJoin(entrypointDir, path), nil
}
func (node *HTTPNode) FilenameAndLastDir() (string, string) {
dir, filename := filepath.Split(node.URL.Path)
return filepath.Base(dir), filename
}