mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 10:52:14 +02:00
qdw
This commit is contained in:
@ -30,12 +30,12 @@ final readonly class BaselineSync
|
|||||||
|
|
||||||
private const string COVERAGE_ASSET = Tia::KEY_COVERAGE_CACHE;
|
private const string COVERAGE_ASSET = Tia::KEY_COVERAGE_CACHE;
|
||||||
|
|
||||||
// Project-local directory where artifacts from previous downloads are
|
// Subdirectory under the per-project state dir (`~/.pest/tia/<project>/`)
|
||||||
// kept (one subfolder per workflow run id). Hitting the same run id on
|
// where artifacts from previous downloads are kept (one subfolder per
|
||||||
// a later fetch skips the `gh run download` round trip entirely —
|
// workflow run id). Hitting the same run id on a later fetch skips
|
||||||
// artifacts are immutable per run id, so the cached bytes are exactly
|
// the `gh run download` round trip entirely — artifacts are immutable
|
||||||
// what gh would re-download.
|
// per run id, so the cached bytes are exactly what gh would re-download.
|
||||||
private const string DOWNLOAD_CACHE_REL_DIR = '.pest/artifacts';
|
private const string DOWNLOAD_CACHE_DIR = 'artifacts';
|
||||||
|
|
||||||
// Most recently downloaded artifacts to retain on disk. Branch
|
// Most recently downloaded artifacts to retain on disk. Branch
|
||||||
// switches and partial baseline rollouts hop across run ids — keeping
|
// switches and partial baseline rollouts hop across run ids — keeping
|
||||||
@ -381,9 +381,7 @@ YAML;
|
|||||||
|
|
||||||
private function downloadCacheDir(string $projectRoot): string
|
private function downloadCacheDir(string $projectRoot): string
|
||||||
{
|
{
|
||||||
return rtrim($projectRoot, '/\\')
|
return Storage::tempDir($projectRoot).DIRECTORY_SEPARATOR.self::DOWNLOAD_CACHE_DIR;
|
||||||
.DIRECTORY_SEPARATOR
|
|
||||||
.str_replace('/', DIRECTORY_SEPARATOR, self::DOWNLOAD_CACHE_REL_DIR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user