From 2728e3e29e8f8ee985910f033ac9eb8c1d28222c Mon Sep 17 00:00:00 2001 From: Dariusz Gafka Date: Sun, 28 May 2023 22:34:25 +0200 Subject: [PATCH] release process --- bin/get-packages | 5 ++++- bin/update-required-packages.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/get-packages b/bin/get-packages index 7adc9f080..d01a76855 100755 --- a/bin/get-packages +++ b/bin/get-packages @@ -41,9 +41,11 @@ function getPackages(): array { continue; } + $name = getPackageNameFromComposerFile($file); $packages[] = [ 'directory' => $directory->getRealPath(), - 'name' => getPackageNameFromComposerFile($file), + 'name' => $name, + 'package' => 'ecotone/' . $name, 'organisation' => 'ecotoneframework', 'repository' => getRepositoryFromComposerFile($file) ]; @@ -52,6 +54,7 @@ function getPackages(): array { $packages[] = [ 'directory' => realpath(__DIR__ . "/../quickstart-examples"), 'name' => "quickstart-examples", + 'package' => 'ecotone/quickstart-examples', 'organisation' => 'ecotoneframework', 'repository' => "quickstart-examples" ]; diff --git a/bin/update-required-packages.php b/bin/update-required-packages.php index 6fd6545d4..9a5ca23cd 100644 --- a/bin/update-required-packages.php +++ b/bin/update-required-packages.php @@ -8,13 +8,14 @@ throw new \InvalidArgumentException("Pass version to update branch alias"); } $packageNames = array_map(function ($package) { - return $package['organisation'] . '/' . $package['name']; + return $package['package']; }, $packages); foreach ($packages as $package) { $composerFile = $package['directory'] . DIRECTORY_SEPARATOR . 'composer.json'; $composer = json_decode(file_get_contents($composerFile), true); $composer['extra']['branch-alias']['dev-main'] = $version . '-dev'; + foreach ($composer['require'] as $requiredPackage => $requiredVersion) { if (in_array($requiredPackage, $packageNames)) { $composer['require'][$requiredPackage] = "~" . $version;