Skip to content

Commit

Permalink
RCAT-376 : push branch changed wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mayur-sose committed Dec 11, 2024
1 parent 464532f commit 131e342
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/update_packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function get_latest_version($packageName) {
return NULL;
}
catch (RequestException $e) {
// echo "Package {$packageName} not found on Packagist. Trying Drupal.org...\n";
return get_latest_version_from_drupal_org($packageName);
}
}
Expand All @@ -58,7 +57,7 @@ function get_latest_version($packageName) {
*/
function get_latest_version_from_drupal_org($packageName) {
$client = new Client();
// Remove "drupal/" prefix
// Remove "drupal/" prefix.
$packageName = str_replace('drupal/', '', $packageName);
$drupalApiUrl = "https://www.drupal.org/api-d7/node.json?field_project_machine_name={$packageName}";

Expand Down Expand Up @@ -122,7 +121,7 @@ function update_packages_yaml($filePath) {

foreach ($packages as $package => &$details) {
if (isset($details['core_matrix'])) {
// Update only '*' entry
// Update only '*' entry.
if (isset($details['core_matrix']['*'])) {
$currentVersion = $details['core_matrix']['*']['version'] ?? NULL;
$latestVersion = get_latest_version($package);
Expand Down

0 comments on commit 131e342

Please sign in to comment.