Skip to content

Commit

Permalink
Merge pull request #18 from chihiro-adachi/4.0.5-4.0.6
Browse files Browse the repository at this point in the history
4.0.6-p1に対応
  • Loading branch information
okazy authored Jun 29, 2021
2 parents 4686aef + 4b4461a commit b3e3641
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 8 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';
const TO_VERSION = '4.0.6-p1';
const PLUGIN_CODE = 'EccubeUpdater405to406';
}
13 changes: 9 additions & 4 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.5, 4.0.5-p1, 4.0.6 を対象とする
if (version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION, '=')
|| version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION.'-p1', '=')) {
|| version_compare(Constant::VERSION, UpdaterConstant::FROM_VERSION.'-p1', '=')
|| version_compare(Constant::VERSION, '4.0.6', '=')) {
$this->supported = true;
} else {
$this->supported = false;
Expand Down Expand Up @@ -142,13 +143,17 @@ public function index(Request $request)
$this->addError('xdebugが有効になっています。無効にしてください。', 'admin');
}

$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 = new Filesystem();
$dir = $this->eccubeConfig->get('plugin_realdir').'/'.UpdaterConstant::PLUGIN_CODE;
$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);
}

return [
Expand Down
Binary file modified Resource/405p1_update_file.tar.gz
Binary file not shown.
Binary file added Resource/406_update_file.tar.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions Resource/file_hash/406_file_hash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.htaccess: ee08e572d233570c18a885774cd28ec4
package.json: 06ad16495508c03ba038b2aeee2770b8
src/Eccube/Common/Constant.php: 92779c491af74ea046211c1c11993ea1
3 changes: 3 additions & 0 deletions Resource/file_hash/406_file_hash_crlf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.htaccess: 48631a26204927aa00aef615d777d04f
package.json: 61b84635f2cfee76e2b61580243aed03
src/Eccube/Common/Constant.php: 539df6eab71d8afd0f07bd9bdbc94b06
3 changes: 2 additions & 1 deletion Resource/template/admin/config.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
<li>XSS脆弱性の修正(JVN#97554111、JVN#95292458)</li>
<li>Symfonyライブラリのアップデート</li>
<li>プラグインのインストール時にrequire-devのライブラリが含まれていた不具合の修正</li>
<li>JVN#95292458 の修正不備に対応</li>
</ul>
<br>
<h6>リリースノート</h6>
<ul>
<li><a target="_blank" rel="noreferrer noopener"
href="https://github.com/EC-CUBE/ec-cube/releases/tag/4.0.6">EC-CUBE 4.0.6</a></li>
href="https://github.com/EC-CUBE/ec-cube/releases/tag/4.0.6-p1">EC-CUBE 4.0.6-p1</a></li>
</ul>

</div>
Expand Down
Binary file modified Resource/update_file.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/update_file_hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -x
BASE_DIR=$(pwd)
WORK_DIR=${BASE_DIR}/work
FROM=4.0.5
TO=4.0.6
TO=4.0.6-p1

# 差分チェックの対象外ファイルの一覧
# ここで指定したファイルは, プラグインの差分チェック時の対象外になります
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ec-cube/EccubeUpdater405to406",
"version": "1.0.0",
"version": "1.0.1",
"description": "EC-CUBEアップデートプラグイン",
"type": "eccube-plugin",
"require": {
Expand Down

0 comments on commit b3e3641

Please sign in to comment.