Skip to content

Commit

Permalink
Merge pull request #26 from sai-gillingham/4.0.5-4.0.6
Browse files Browse the repository at this point in the history
4.0.5~4.0.6-p2
  • Loading branch information
chihiro-adachi authored Sep 20, 2022
2 parents a0fc58b + 8a79ec0 commit e601e13
Show file tree
Hide file tree
Showing 21 changed files with 1,888 additions and 1,748 deletions.
2 changes: 1 addition & 1 deletion Common/Constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
class Constant
{
const FROM_VERSION = '4.0.5';
const TO_VERSION = '4.0.6-p1';
const TO_VERSION = '4.0.6-p2';
const PLUGIN_CODE = 'EccubeUpdater405to406';
}
30 changes: 20 additions & 10 deletions Controller/Admin/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public function __construct(
$this->composerApiService = $composerApiService;
$this->eccubeConfig = $eccubeConfig;

// 4.0.5, 4.0.5-p1, 4.0.6 を対象とする
// 4.0.5, 4.0.5-p1, 4.0.6, 4.0.6-p1 を対象とする
if (version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION, '=')
|| version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION.'-p1', '=')
|| version_compare(Constant::VERSION, '4.0.6-p1', '=')
|| version_compare(Constant::VERSION, '4.0.6', '=')) {
$this->supported = true;
} else {
Expand Down Expand Up @@ -145,17 +146,26 @@ public function index(Request $request)

$fs = new Filesystem();
$dir = $this->eccubeConfig->get('plugin_realdir').'/'.UpdaterConstant::PLUGIN_CODE;
// 4.0.5-p1の場合は、ハッシュファイル・アップデートファイルを差し替え
if (version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION.'-p1', '=')) {
$fs->copy($dir.'/Resource/file_hash/405p1_file_hash.yaml', $dir.'/Resource/file_hash/file_hash.yaml', true);
$fs->copy($dir.'/Resource/file_hash/405p1_file_hash_crlf.yaml', $dir.'/Resource/file_hash/file_hash_crlf.yaml', true);
$fs->copy($dir.'/Resource/405p1_update_file.tar.gz', $dir.'/Resource/update_file.tar.gz', true);
} elseif (version_compare(Constant::VERSION, '4.0.6', '=')) { // 4.0.6の場合は、ハッシュファイル・アップデートファイルを差し替え
$fs->copy($dir.'/Resource/file_hash/406_file_hash.yaml', $dir.'/Resource/file_hash/file_hash.yaml', true);
$fs->copy($dir.'/Resource/file_hash/406_file_hash_crlf.yaml', $dir.'/Resource/file_hash/file_hash_crlf.yaml', true);
$fs->copy($dir.'/Resource/406_update_file.tar.gz', $dir.'/Resource/update_file.tar.gz', true);

if (version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION, '=')) {
$versionString = '405';
} elseif (version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION.'-p1', '=')) {
$versionString = '405p1';
} elseif (version_compare(Constant::VERSION, '4.0.6', '=')) {
$versionString = '406';
} elseif (version_compare(Constant::VERSION, '4.0.6-p1', '=')) {
$versionString = '406p1';
} else {
// バージョンミスがあれば、copy処理をスキップする
return [
'supported' => $this->supported,
];
}

$fs->copy($dir."/Resource/file_hash/{$versionString}_file_hash.yaml", $dir.'/Resource/file_hash/file_hash.yaml', true);
$fs->copy($dir."/Resource/file_hash/{$versionString}_file_hash_crlf.yaml", $dir.'/Resource/file_hash/file_hash_crlf.yaml', true);
$fs->copy($dir."/Resource/{$versionString}_update_file.tar.gz", $dir.'/Resource/update_file.tar.gz', true);

return [
'supported' => $this->supported,
];
Expand Down
Binary file added Resource/405_update_file.tar.gz
Binary file not shown.
Binary file modified Resource/405p1_update_file.tar.gz
Binary file not shown.
Binary file modified Resource/406_update_file.tar.gz
Binary file not shown.
Binary file added Resource/406p1_update_file.tar.gz
Binary file not shown.
861 changes: 861 additions & 0 deletions Resource/file_hash/405_file_hash.yaml

Large diffs are not rendered by default.

861 changes: 861 additions & 0 deletions Resource/file_hash/405_file_hash_crlf.yaml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Resource/file_hash/405p1_file_hash.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.htaccess: c87a39451f3e73bd0f059e45046b1154
package.json: 405361ea338ddcd21b47b2d46263d521
src/Eccube/Common/Constant.php: 1e6d23604111f496546b4b8e9ec682cd
src/Eccube/Controller/Admin/Content/FileController.php: 3bc77ffe5b17805c421e81d49cb42523
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: 8b4dd34326c353a3aa849a7558fd2fe6
src/Eccube/Form/Type/Admin/ProductType.php: 107cacb875d5d562fcbb8659986dfee4
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: 463660bad6d5f39b2531e78a332be0ee
src/Eccube/Resource/template/admin/Setting/Shop/payment_edit.twig: 4f46bd401bb4d56d5b2828715546b3d2
src/Eccube/Service/Composer/ComposerApiService.php: 65cbfea7bd2b8cced23cd017ab6b5b73
vendor/symfony/asset/composer.json: fd1813697b0423785abc24149cb1e2d4
Expand Down
4 changes: 4 additions & 0 deletions Resource/file_hash/405p1_file_hash_crlf.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.htaccess: d62eb75fb145a43d6f0a3b0cd26392c9
package.json: 8c6d52f66a468a1728183d7745972933
src/Eccube/Common/Constant.php: e75b3e2aee9532b67093cf4ede578199
src/Eccube/Controller/Admin/Content/FileController.php: 4cc52dcce65583312b51cb3dcd5839d4
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: cff16dfc42b2aa52a1a44f69c71b187c
src/Eccube/Form/Type/Admin/ProductType.php: f972198507398d79fded1c23c63e470e
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: d06e11c4d52caee56fcf3ea6a692aa47
src/Eccube/Resource/template/admin/Setting/Shop/payment_edit.twig: c2ac0d481febc8cabc144c2fc63140f7
src/Eccube/Service/Composer/ComposerApiService.php: bbf4d9407877727d9230ee17ffabcb67
vendor/symfony/asset/composer.json: 252fa40274eb6cfb14ec46a6e1dd272c
Expand Down
4 changes: 4 additions & 0 deletions Resource/file_hash/406_file_hash.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.htaccess: ee08e572d233570c18a885774cd28ec4
package.json: 06ad16495508c03ba038b2aeee2770b8
src/Eccube/Common/Constant.php: 92779c491af74ea046211c1c11993ea1
src/Eccube/Controller/Admin/Content/FileController.php: 3bc77ffe5b17805c421e81d49cb42523
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: 8b4dd34326c353a3aa849a7558fd2fe6
src/Eccube/Form/Type/Admin/ProductType.php: 107cacb875d5d562fcbb8659986dfee4
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: 463660bad6d5f39b2531e78a332be0ee
4 changes: 4 additions & 0 deletions Resource/file_hash/406_file_hash_crlf.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.htaccess: 48631a26204927aa00aef615d777d04f
package.json: 61b84635f2cfee76e2b61580243aed03
src/Eccube/Common/Constant.php: 539df6eab71d8afd0f07bd9bdbc94b06
src/Eccube/Controller/Admin/Content/FileController.php: 4cc52dcce65583312b51cb3dcd5839d4
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: cff16dfc42b2aa52a1a44f69c71b187c
src/Eccube/Form/Type/Admin/ProductType.php: f972198507398d79fded1c23c63e470e
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: d06e11c4d52caee56fcf3ea6a692aa47
6 changes: 6 additions & 0 deletions Resource/file_hash/406p1_file_hash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package.json: 85e40ad644e17885a8223bca7d093926
src/Eccube/Common/Constant.php: 6db86fd1d9b975c8e024103424584639
src/Eccube/Controller/Admin/Content/FileController.php: 3bc77ffe5b17805c421e81d49cb42523
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: 8b4dd34326c353a3aa849a7558fd2fe6
src/Eccube/Form/Type/Admin/ProductType.php: 107cacb875d5d562fcbb8659986dfee4
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: 463660bad6d5f39b2531e78a332be0ee
6 changes: 6 additions & 0 deletions Resource/file_hash/406p1_file_hash_crlf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package.json: 5d25f4c3def43dfaf992d87d15c370b7
src/Eccube/Common/Constant.php: 4f422d823c0ad255dfbf54f5f776e03d
src/Eccube/Controller/Admin/Content/FileController.php: 4cc52dcce65583312b51cb3dcd5839d4
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php: cff16dfc42b2aa52a1a44f69c71b187c
src/Eccube/Form/Type/Admin/ProductType.php: f972198507398d79fded1c23c63e470e
src/Eccube/Resource/template/admin/Setting/Shop/delivery_edit.twig: d06e11c4d52caee56fcf3ea6a692aa47
Loading

0 comments on commit e601e13

Please sign in to comment.