-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,701 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php declare(strict_types=1); | ||
|
||
require_once __DIR__ . '/../../../../vendor/autoload.php'; | ||
|
||
use Monolog\Formatter\LineFormatter; | ||
use Monolog\Handler\StreamHandler; | ||
use Monolog\Logger; | ||
|
||
const COMPOSER_JSON_DEST = __DIR__ . '/../composer.json'; | ||
const SYS_TMP_DIR = __DIR__ . '/../'; | ||
const TMP_DIR = __DIR__ . '/../'; | ||
|
||
// Type of release you are making | ||
const RELEASE_GIT_ENV = 'GIT'; | ||
const RELEASE_SW_ENV = 'SW'; | ||
|
||
$release_env = ($argv[1] == RELEASE_SW_ENV) ? RELEASE_SW_ENV : RELEASE_GIT_ENV; | ||
|
||
$formatter = new LineFormatter(null, null, false, true); | ||
$logger = (new Logger('release')) | ||
->pushHandler((new StreamHandler('php://stdout'))->setFormatter($formatter)); | ||
|
||
$composerJsonData = json_decode(file_get_contents(COMPOSER_JSON_DEST), true); | ||
$composerJsonData['require']['shopware/core'] = '^6.2'; | ||
$composerJsonData['require']['shopware/storefront'] = '^6.2'; | ||
|
||
switch ($release_env) { | ||
case RELEASE_GIT_ENV: | ||
exec('composer require postfinancecheckout/sdk 2.1.0 -d /var/www/shopware.local'); | ||
$composerJsonData['require']['postfinancecheckout/sdk'] = '2.1.0'; | ||
break; | ||
case RELEASE_SW_ENV: | ||
exec('composer require postfinancecheckout/sdk 2.1.0 -d /var/www/shopware.local/custom/plugins/PostFinanceCheckoutPayment'); | ||
break; | ||
} | ||
|
||
$logger->info('Adding shopware/core and shopware/storefront to the composer.json.'); | ||
file_put_contents( | ||
TMP_DIR . '/composer.json', | ||
json_encode($composerJsonData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) | ||
); | ||
chdir(TMP_DIR); | ||
exec('rm -fr composer.lock'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,58 @@ | ||
{ | ||
"authors": [ | ||
{ | ||
"homepage": "https://customweb.com", | ||
"name": "customweb GmbH" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"PostFinanceCheckoutPayment\\": "src/" | ||
} | ||
}, | ||
"conflict": { | ||
"shopware/administration": "<6,>=7", | ||
"shopware/storefront": "<6,>=7" | ||
}, | ||
"description": "PostFinanceCheckout integration for Shopware 6", | ||
"extra": { | ||
"copyright": "(c) by customweb GmbH", | ||
"description": { | ||
"de-DE": "PostFinanceCheckout integration für Shopware 6", | ||
"en-GB": "PostFinanceCheckout integration for Shopware 6" | ||
}, | ||
"label": { | ||
"de-DE": "PostFinanceCheckout Produkte für Shopware 6", | ||
"en-GB": "PostFinanceCheckout Products for Shopware 6" | ||
}, | ||
"shopware-plugin-class": "PostFinanceCheckoutPayment\\PostFinanceCheckoutPayment" | ||
}, | ||
"homepage": "https://www.postfinance.ch/checkout/", | ||
"keywords": [ | ||
"PostFinance Checkout", | ||
"payment", | ||
"php", | ||
"shopware" | ||
], | ||
"license": "Apache-2.0", | ||
"name": "postfinancecheckout/shopware-6", | ||
"require": { | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
"ext-mbstring": "*", | ||
"php": ">=7.2", | ||
"shopware/core": ">=6.2,<7", | ||
"shopware/storefront": ">=6.2,<7", | ||
"postfinancecheckout/sdk": "2.1.*" | ||
}, | ||
"type": "shopware-platform-plugin", | ||
"version": "1.1.10" | ||
"authors": [ | ||
{ | ||
"homepage": "https://www.postfinance.ch/checkout", | ||
"name": "PostFinance Checkout" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"PostFinanceCheckoutPayment\\": "src/" | ||
} | ||
}, | ||
"conflict": { | ||
"shopware/administration": "<6,>=7", | ||
"shopware/storefront": "<6,>=7" | ||
}, | ||
"description": "PostFinanceCheckout integration for Shopware 6", | ||
"extra": { | ||
"copyright": "(c) by PostFinance Checkout", | ||
"description": { | ||
"de-DE": "PostFinanceCheckout integration f\u00fcr Shopware 6", | ||
"en-GB": "PostFinanceCheckout integration for Shopware 6" | ||
}, | ||
"label": { | ||
"de-DE": "PostFinanceCheckout Produkte f\u00fcr Shopware 6", | ||
"en-GB": "PostFinanceCheckout Products for Shopware 6" | ||
}, | ||
"manufacturerLink": { | ||
"de-DE": "https://www.postfinance.ch/checkout", | ||
"en-GB": "https://www.postfinance.ch/checkout" | ||
}, | ||
"supportLink": { | ||
"de-DE": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html", | ||
"en-GB": "https://www.postfinance.ch/en/business/support/written-contact/contact-form.html" | ||
}, | ||
"shopware-plugin-class": "PostFinanceCheckoutPayment\\PostFinanceCheckoutPayment" | ||
}, | ||
"homepage": "https://www.postfinance.ch/checkout/", | ||
"keywords": [ | ||
"PostFinance Checkout", | ||
"payment", | ||
"php", | ||
"shopware" | ||
], | ||
"license": "Apache-2.0", | ||
"name": "postfinancecheckout/shopware-6", | ||
"require": { | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
"ext-mbstring": "*", | ||
"php": ">=7.2", | ||
"shopware/core": "^6.2", | ||
"shopware/storefront": "^6.2", | ||
"postfinancecheckout/sdk": "2.1.0" | ||
}, | ||
"type": "shopware-platform-plugin", | ||
"version": "1.1.14" | ||
} |
Oops, something went wrong.