Skip to content

Commit

Permalink
Add releases 2.4.4-p9, 2.4.5-p8, 2.4.6-p6, and 2.4.7-p1 to mirror (#160)
Browse files Browse the repository at this point in the history
* Add current payent-services bundled extension release packages

* Use capital case secret name to match github UI

* feat: use composer.json version if found instead of exact constructed match (#161)

* fix: only add caret to constructed version constraint (#162)

* Add upstream releases 2.4.4-p9, 2.4.5-p8, 2.4.6-p6, and 2.4.7-p1 (#163)

* Add missing braintree patch releases (#164)
  • Loading branch information
Vinai authored Jun 11, 2024
1 parent dd7d5e4 commit 92e89ad
Show file tree
Hide file tree
Showing 61 changed files with 2,407 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-upstream-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
with:
repo: ${{ inputs.repo }}
secrets:
composer_auth: ${{ secrets.composer_auth }}
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
6 changes: 3 additions & 3 deletions .github/workflows/integrity-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
type: string
secrets:
composer_auth:
COMPOSER_AUTH:
required: true
jobs:
compute-matrix:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
install-directory: ${{ github.workspace }}/mageos
magento-version: ${{ matrix.magento }}
composer-version: ${{ matrix.composer }}
composer-auth: ${{ secrets.composer_auth }}
composer-auth: ${{ secrets.COMPOSER_AUTH }}
php-version: ${{ matrix.php }}
sample-data: 'true'

Expand All @@ -51,7 +51,7 @@ jobs:
install-directory: ${{ github.workspace }}/magento
magento-version: ${{ matrix.magento }}
composer-version: ${{ matrix.composer }}
composer-auth: ${{ secrets.composer_auth }}
composer-auth: ${{ secrets.COMPOSER_AUTH }}
php-version: ${{ matrix.php }}
sample-data: 'true'

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build, Deploy & check Integrity of preview-mirror](https://github.com/mage-os/generate-mirror-repo-js/actions/workflows/build-preview-mirror.yml/badge.svg)](https://github.com/mage-os/generate-mirror-repo-js/actions/workflows/build-preview-mirror.yml)

# Mage-OS Composer Repository Generator

## Background
Expand Down
20 changes: 17 additions & 3 deletions bin/find-composer-packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
}

$loader = require($argv[1]);
$rootComposerFile = realpath(dirname($argv[1]) . '/../composer.json');

if (! file_exists($rootComposerFile)) {
fwrite(STDERR, sprintf("ERROR: Unable to find root composer.json file \"%s\"\n", $rootComposerFile));
exit(2);
}

$rootComposerConfig = json_decode(file_get_contents($rootComposerFile), true);


// Get length of file path (returned by $loader) up to package dir inside composer
$needle = 'vendor/composer/../';
Expand Down Expand Up @@ -62,10 +71,15 @@ function getPackageForClass(ClassLoader $loader, string $class)
continue;
}
try {
$version = \Composer\InstalledVersions::getVersion($package);
$depVersion = $rootComposerConfig['require'][$package]
?? $rootComposerConfig['require-dev'][$package]
?? null;
if ($depVersion === null) {
$version = \Composer\InstalledVersions::getVersion($package);
$depVersion = '^' . substr($version, 0, strrpos($version, '.'));
}
$done[$package] = true;
$depVersion = substr($version, 0, strrpos($version, '.'));
echo "\"$package\": \"^$depVersion\"\n";
echo "\"$package\": \"$depVersion\"\n";
} catch (OutOfBoundsException $exception) {
// ignore package
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 92e89ad

Please sign in to comment.