Skip to content

Commit

Permalink
release process
Browse files Browse the repository at this point in the history
  • Loading branch information
dgafka committed May 28, 2023
1 parent fc9f4df commit 2728e3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/get-packages
Original file line number Diff line number Diff line change
Expand Up @@ -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)
];
Expand All @@ -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"
];
Expand Down
3 changes: 2 additions & 1 deletion bin/update-required-packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2728e3e

Please sign in to comment.