Skip to content

Commit 53db774

Browse files
weaverryannicolas-grekas
authored andcommitted
do not include the version in the archived path
1 parent 218f28e commit 53db774

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/GenerateArchivedRecipesCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5050
$process->mustRun();
5151

5252
$tmpDir = sys_get_temp_dir().'/_flex_archive/';
53+
if (file_exists($tmpDir)) {
54+
$filesystem->remove($tmpDir);
55+
}
5356
$filesystem->mkdir($tmpDir);
5457

5558
$process = (new Process(['git', 'rev-list', '--count', $branch, '--no-merges'], $recipesDirectory))->mustRun();

src/GenerateFlexEndpointCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private function generatePackageJson(string $package, string $version, array $ma
153153
file_put_contents(sprintf('%s/%s.%s.json', $outputDir, str_replace('/', '.', $package), $version), $contents);
154154

155155
// save another version for the archives
156-
$archivedPath = sprintf('%s/archived/%s.%s/%s.json', $outputDir, str_replace('/', '.', $package), $version, $tree);
156+
$archivedPath = sprintf('%s/archived/%s/%s.json', $outputDir, str_replace('/', '.', $package), $tree);
157157
if (!file_exists(\dirname($archivedPath))) {
158158
mkdir(\dirname($archivedPath), 0777, true);
159159
}

0 commit comments

Comments
 (0)