From d51122e4dfb728520f0c165395e34d187ce34844 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 5 Jan 2019 18:24:50 +0900
Subject: [PATCH 01/24] =?UTF-8?q?Space=E3=83=A2=E3=83=87=E3=83=AB=E3=81=AE?=
=?UTF-8?q?=E3=82=AF=E3=82=A8=E3=83=AA=E7=B5=90=E6=9E=9C=E3=82=92=E3=82=AD?=
=?UTF-8?q?=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B=E3=82=88?=
=?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F=E3=81=93?=
=?UTF-8?q?=E3=81=A8=E3=81=AB=E3=82=88=E3=82=8B=E6=94=B9=E4=BF=AE=20https:?=
=?UTF-8?q?//github.com/NetCommons3/NetCommons3/issues/1337?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Model/Behavior/SystemManagerSaveBehavior.php | 1 +
Model/SiteSetting.php | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Model/Behavior/SystemManagerSaveBehavior.php b/Model/Behavior/SystemManagerSaveBehavior.php
index cfd09aa..ce6a95a 100644
--- a/Model/Behavior/SystemManagerSaveBehavior.php
+++ b/Model/Behavior/SystemManagerSaveBehavior.php
@@ -49,6 +49,7 @@ public function saveRoomDiskSize(Model $model, $data) {
if (! $model->Space->saveField('room_disk_size', $value)) {
throw new InternalErrorException(__d('net_commons', 'Internal Server Error'));
}
+ $model->Space->cacheClear();
unset($data[$model->alias][$key]);
}
diff --git a/Model/SiteSetting.php b/Model/SiteSetting.php
index 4ac42cb..e8ae9b5 100644
--- a/Model/SiteSetting.php
+++ b/Model/SiteSetting.php
@@ -313,7 +313,7 @@ public function getDefaultStartPage() {
return '/';
}
- $space = $this->Space->find('first', array(
+ $space = $this->Space->cacheFindQuery('first', array(
'recursive' => -1,
'conditions' => array('id' => $room['Room']['space_id'])
));
From 500d0e1c8268082010f381575e8781e592e2008a Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 6 Jan 2019 10:19:47 +0900
Subject: [PATCH 02/24] =?UTF-8?q?Plugin=E3=83=A2=E3=83=87=E3=83=AB?=
=?UTF-8?q?=E3=81=AE=E3=82=AF=E3=82=A8=E3=83=AA=E7=B5=90=E6=9E=9C=E3=82=92?=
=?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B?=
=?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?=
=?UTF-8?q?=E3=81=93=E3=81=A8=E3=81=AB=E3=82=88=E3=82=8B=E6=94=B9=E4=BF=AE?=
=?UTF-8?q?=20https://github.com/NetCommons3/NetCommons3/issues/1337?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Controller/UseLanguagesController.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Controller/UseLanguagesController.php b/Controller/UseLanguagesController.php
index 260cc8b..98fad7a 100644
--- a/Controller/UseLanguagesController.php
+++ b/Controller/UseLanguagesController.php
@@ -76,7 +76,7 @@ public function edit() {
}
}
- $plugins = $this->Plugin->find('list', array(
+ $plugins = $this->Plugin->cacheFindQuery('list', array(
'recursive' => -1,
'fields' => array('key', 'name'),
'conditions' => array(
@@ -87,7 +87,7 @@ public function edit() {
));
$this->set('plugins', $plugins);
- $plugins = $this->Plugin->find('list', array(
+ $plugins = $this->Plugin->cacheFindQuery('list', array(
'recursive' => -1,
'fields' => array('key', 'key'),
'conditions' => array(
From d0c8192c9c41ce7661584e9b82c78a83a78e72fd Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 25 Jan 2019 16:59:23 +0900
Subject: [PATCH 03/24] =?UTF-8?q?=E7=8F=BE=E5=9C=A8=E3=81=AEIP=E3=82=A2?=
=?UTF-8?q?=E3=83=89=E3=83=AC=E3=82=B9=E3=81=AE=E5=8F=96=E5=BE=97=E3=82=84?=
=?UTF-8?q?IP=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9=E3=81=AE=E3=83=81?=
=?UTF-8?q?=E3=82=A7=E3=83=83=E3=82=AF=E3=81=AF=E3=80=81Model=E3=81=AB?=
=?UTF-8?q?=E9=96=A2=E4=BF=82=E3=81=AA=E3=81=84=E3=81=9F=E3=82=81=E3=80=81?=
=?UTF-8?q?Utility=E3=81=AB=E7=A7=BB=E5=8B=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Model/Behavior/IpAddressManagerBehavior.php | 53 ++++++++++-----------
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/Model/Behavior/IpAddressManagerBehavior.php b/Model/Behavior/IpAddressManagerBehavior.php
index c6a16ad..89c9457 100644
--- a/Model/Behavior/IpAddressManagerBehavior.php
+++ b/Model/Behavior/IpAddressManagerBehavior.php
@@ -11,6 +11,7 @@
App::uses('SiteSettingValidateBehavior', 'SiteManager.Model/Behavior');
App::uses('Current', 'NetCommons.Utility');
+App::uses('NetCommonsSecurity', 'NetCommons.Utility');
/**
* IpAddress管理 Behavior
@@ -20,6 +21,28 @@
*/
class IpAddressManagerBehavior extends SiteSettingValidateBehavior {
+/**
+ * NetCommonsSecurityユーティリティ
+ *
+ * @var object
+ */
+ public $NetCommonsSecurity;
+
+/**
+ * ビヘイビアの設定処理
+ *
+ * @param Model $model ビヘイビア呼び出し元モデル
+ * @param array $config $modelのためのコンフィグ設定
+ * @return void
+ */
+ public function setup(Model $model, $config = array()) {
+ parent::setup($model, $config);
+
+ if (! $this->NetCommonsSecurity) {
+ $this->NetCommonsSecurity = new NetCommonsSecurity();
+ }
+ }
+
/**
* IPアドレスのアクセス拒否のValidate処理
*
@@ -97,7 +120,7 @@ public function validateAllowSystemPluginIps(Model $model, $data) {
* @return string
*/
public function getCurrentIp(Model $model) {
- return Hash::get($_SERVER, 'HTTP_X_FORWARDED_FOR', Hash::get($_SERVER, 'REMOTE_ADDR'));
+ return $this->NetCommonsSecurity->getCurrentIp();
}
/**
@@ -108,33 +131,7 @@ public function getCurrentIp(Model $model) {
* @return bool
*/
public function hasCurrentIp(Model $model, $ips) {
- if (! $ips) {
- return false;
- }
-
- if (is_string($ips)) {
- $ips = explode('|', $ips);
- }
-
- $currentIp = $this->getCurrentIp($model);
- if (! $currentIp) {
- return false;
- }
- foreach ($ips as $accept) {
- if (strpos($accept, '/')) {
- list($acceptIp, $mask) = explode('/', $accept);
- } else {
- $acceptIp = $accept;
- $mask = 32;
- }
- $acceptLong = ip2long($acceptIp) >> (32 - $mask);
- $currentLong = ip2long($currentIp) >> (32 - $mask);
- if ($acceptLong === $currentLong) {
- return true;
- }
- }
-
- return false;
+ return $this->NetCommonsSecurity->hasCurrentIp($ips);
}
/**
From 983cc2dc41f636e3a2a8ae7d2e689f26ffa41543 Mon Sep 17 00:00:00 2001
From: Ryuji AMANO
Date: Wed, 26 Jun 2019 07:50:18 +0900
Subject: [PATCH 04/24] =?UTF-8?q?change:=20=E3=83=91=E3=83=96=E3=83=AA?=
=?UTF-8?q?=E3=83=83=E3=82=AF=E3=83=AB=E3=83=BC=E3=83=A0=E3=81=AE=E5=AE=B9?=
=?UTF-8?q?=E9=87=8F=E5=88=B6=E9=99=90=E3=82=92=E8=A8=AD=E5=AE=9A=E3=81=A7?=
=?UTF-8?q?=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Model/Behavior/SystemManagerSaveBehavior.php | 7 +++++--
Model/Behavior/SystemManagerValidateBehavior.php | 7 +++++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Model/Behavior/SystemManagerSaveBehavior.php b/Model/Behavior/SystemManagerSaveBehavior.php
index ce6a95a..8cbf898 100644
--- a/Model/Behavior/SystemManagerSaveBehavior.php
+++ b/Model/Behavior/SystemManagerSaveBehavior.php
@@ -28,8 +28,10 @@ class SystemManagerSaveBehavior extends ModelBehavior {
* @throws InternalErrorException
*/
public function saveRoomDiskSize(Model $model, $data) {
- if (! isset($data[$model->alias]['App.disk_for_group_room']) ||
- ! isset($data[$model->alias]['App.disk_for_private_room'])) {
+ if (! isset($data[$model->alias]['App.disk_for_public_room']) ||
+ ! isset($data[$model->alias]['App.disk_for_group_room']) ||
+ ! isset($data[$model->alias]['App.disk_for_private_room'])
+ ) {
return $data;
}
$model->loadModels([
@@ -37,6 +39,7 @@ public function saveRoomDiskSize(Model $model, $data) {
]);
$spaces = array(
+ 'App.disk_for_public_room' => Space::PUBLIC_SPACE_ID,
'App.disk_for_group_room' => Space::COMMUNITY_SPACE_ID,
'App.disk_for_private_room' => Space::PRIVATE_SPACE_ID,
);
diff --git a/Model/Behavior/SystemManagerValidateBehavior.php b/Model/Behavior/SystemManagerValidateBehavior.php
index c5ba45b..ba03c69 100644
--- a/Model/Behavior/SystemManagerValidateBehavior.php
+++ b/Model/Behavior/SystemManagerValidateBehavior.php
@@ -69,6 +69,13 @@ public function validateSystemSetting(Model $model, $data) {
__d('net_commons', 'Invalid request.'));
}
+ //パブリックルームの容量
+ $value = (int)Hash::get($data[$model->alias]['App.disk_for_public_room'], '0.value');
+ if (! in_array($value, $model->SiteSetting->diskSpace, true)) {
+ $this->_setValidationMessage($model, 'App.disk_for_public_room', '0',
+ __d('net_commons', 'Invalid request.'));
+ }
+
//グループルームの容量
$value = (int)Hash::get($data[$model->alias]['App.disk_for_group_room'], '0.value');
if (! in_array($value, $model->SiteSetting->diskSpace, true)) {
From 602ee201f2f8309a347a247052eb645905bdf2b0 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 21 Sep 2019 23:06:09 +0900
Subject: [PATCH 05/24] =?UTF-8?q?fix:=20test:=20travis-ci=E3=81=AEphp7.2?=
=?UTF-8?q?=E5=AF=BE=E5=BF=9C=20https://github.com/NetCommons3/NetCommons3?=
=?UTF-8?q?/issues/1451?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.travis.yml | 2 ++
phpunit.xml.dist | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index d16e57b..345a2f7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,8 +6,10 @@ php:
- 5.6
- 7.0
- 7.1
+ - 7.2
sudo: false
+dist: trusty
env:
matrix:
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 18b7c21..2bb02e8 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,6 +14,5 @@
-
From dd239e4be85e4ee3cf422db3aa3933290d10d40f Mon Sep 17 00:00:00 2001
From: Shohei Nakajima
Date: Sun, 22 Sep 2019 09:01:11 +0900
Subject: [PATCH 06/24] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index cfb5af9..474f6db 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
SiteManager
==============
-
+
SiteManager for NetComomns3
[](https://travis-ci.org/NetCommons3/SiteManager)
From 630c07271de4824cec71a94e2812fa06c79f197a Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Wed, 13 Nov 2019 14:17:53 +0900
Subject: [PATCH 07/24] =?UTF-8?q?change:=20=E3=83=9D=E3=83=83=E3=83=97?=
=?UTF-8?q?=E3=82=AA=E3=83=BC=E3=83=90=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=99?=
=?UTF-8?q?=E3=82=8B=E3=83=98=E3=83=AB=E3=83=97=E3=81=AE=E3=82=A2=E3=82=A4?=
=?UTF-8?q?=E3=82=B3=E3=83=B3=E3=81=AF=E3=80=81info=E3=81=A8=E3=81=99?=
=?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=20https:?=
=?UTF-8?q?//github.com/researchmap/RmNetCommons3/issues/1011?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
View/Helper/SiteManagerHelper.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/View/Helper/SiteManagerHelper.php b/View/Helper/SiteManagerHelper.php
index d2863c4..ff9f41a 100644
--- a/View/Helper/SiteManagerHelper.php
+++ b/View/Helper/SiteManagerHelper.php
@@ -377,7 +377,7 @@ public function helpSiteClose($placement = 'bottom') {
$html .= __d('net_commons', 'Can use an embedded keyword.') . ' ';
$html .= '';
- $html .= '';
+ $html .= '';
$html .= '';
$html .= '';
From ee1122293e44a2b23eab7dc4f58baebec3090a89 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 14 Mar 2020 14:55:27 +0900
Subject: [PATCH 08/24] =?UTF-8?q?change:=20test:=20travis.yml=E3=81=8B?=
=?UTF-8?q?=E3=82=89php5.4,5.5=E3=82=92=E5=89=8A=E9=99=A4=E3=80=82php7.3,7?=
=?UTF-8?q?.4=E3=82=92=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/?=
=?UTF-8?q?NetCommons3/issues/1560?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 345a2f7..086aeea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,12 @@
language: php
php:
- - 5.4
- - 5.5
- 5.6
- 7.0
- 7.1
- 7.2
+ - 7.3
+ - 7.4
sudo: false
dist: trusty
From 3698478e15cdba2e3ae9520e2fc919d649788675 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 8 Aug 2020 16:10:31 +0900
Subject: [PATCH 09/24] =?UTF-8?q?change:=20test:=20Travis=E3=81=8B?=
=?UTF-8?q?=E3=82=89PHP5.6=E3=82=92=E5=89=8A=E9=99=A4,php72=E4=BB=A5?=
=?UTF-8?q?=E9=99=8D=E3=81=A7UnitTest=E3=81=A7Warning=E3=81=8C=E5=87=BA?=
=?UTF-8?q?=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.?=
=?UTF-8?q?com/NetCommons3/NetCommons3/issues/1588?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.travis.yml | 1 -
phpunit.xml.dist | 6 ++++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 086aeea..4e2074e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: php
php:
- - 5.6
- 7.0
- 7.1
- 7.2
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 2bb02e8..b54a661 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,5 +1,11 @@
+
+
+
+
+
+
app/Plugin/SiteManager
From d0d681238447d7e81e6e661554f774cf36a7a1ef Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Wed, 26 Aug 2020 20:22:09 +0900
Subject: [PATCH 10/24] change: Version number to 3.3.2
---
VERSION.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 VERSION.txt
diff --git a/VERSION.txt b/VERSION.txt
new file mode 100644
index 0000000..4772543
--- /dev/null
+++ b/VERSION.txt
@@ -0,0 +1 @@
+3.3.2
From afbcbc728a8209e00e9ecba959513b417b5f30ed Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 11 Dec 2020 11:35:13 +0900
Subject: [PATCH 11/24] =?UTF-8?q?fix:=20WYSIWYG=E3=81=AB=E3=81=8A=E3=81=91?=
=?UTF-8?q?=E3=82=8B=E8=A8=AD=E5=AE=9A=E3=83=9F=E3=82=B9=E3=81=AE=E4=BF=AE?=
=?UTF-8?q?=E6=AD=A3=20https://github.com/researchmap/RmNetCommons3/issues?=
=?UTF-8?q?/2331?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Behavior/SiteManagerValidateBehavior.php | 7 +++++
.../Behavior/SiteSettingValidateBehavior.php | 27 +++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/Model/Behavior/SiteManagerValidateBehavior.php b/Model/Behavior/SiteManagerValidateBehavior.php
index 5d94ea3..22de02f 100644
--- a/Model/Behavior/SiteManagerValidateBehavior.php
+++ b/Model/Behavior/SiteManagerValidateBehavior.php
@@ -74,6 +74,7 @@ public function validateSiteClose(Model $model, $data) {
);
foreach ($settingKeys as $key) {
if (Hash::get($data[$model->alias]['App.close_site'], '0.value')) {
+ $data = $this->_cleansingWysiwyg($model, $data, $key);
$data = $this->_validateRequired($model, $data, $key);
} else {
unset($data[$model->alias][$key]);
@@ -184,6 +185,9 @@ private function __validateMembershipAutoRegist(Model $model, $data) {
// __d('net_commons', 'Invalid request.'));
//}
+ //利用規約文
+ $data = $this->_cleansingWysiwyg($model, $data, 'AutoRegist.disclaimer');
+
//会員登録承認メール、会員登録受付メール
$settingKeys = array(
'AutoRegist.approval_mail_subject',
@@ -256,6 +260,9 @@ private function __validateMembershipUserCancel(Model $model, $data) {
__d('net_commons', 'Invalid request.'));
}
+ //退会規約文
+ $data = $this->_cleansingWysiwyg($model, $data, 'UserCancel.disclaimer');
+
//退会完了メール
$settingKeys = array(
'UserCancel.mail_subject',
diff --git a/Model/Behavior/SiteSettingValidateBehavior.php b/Model/Behavior/SiteSettingValidateBehavior.php
index a30546f..9ebe983 100644
--- a/Model/Behavior/SiteSettingValidateBehavior.php
+++ b/Model/Behavior/SiteSettingValidateBehavior.php
@@ -55,6 +55,33 @@ protected function _validateRequired(Model $model, $data, $key) {
return $data;
}
+/**
+ * Wysiwygのクレンジング
+ *
+ * @param Model $model ビヘイビア呼び出し元モデル
+ * @param array $data リクエストデータ配列
+ * @param string $key キー
+ * @return array リクエストデータ
+ */
+ protected function _cleansingWysiwyg(Model $model, $data, $key) {
+ if (! isset($data[$model->alias][$key])) {
+ return $data;
+ }
+
+ $model->Behaviors->load('Wysiwyg.Purifiable', [
+ 'fields' => [$model->alias => ['value']],
+ ]);
+
+ foreach ($data[$model->alias][$key] as $langId => $check) {
+ $model->create($check);
+ $model->validates();
+ $data[$model->alias][$key][$langId] = $model->data[$model->alias];
+ }
+
+ $model->Behaviors->unload('Wysiwyg.Purifiable');
+ return $data;
+ }
+
/**
* validationMessageの有無
*
From d74e31346cedc75c259bffb331a17dd202e12902 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 13 Dec 2020 15:16:57 +0900
Subject: [PATCH 12/24] =?UTF-8?q?fix:=20test:=20TravisCI=E3=81=AEphp7.3?=
=?UTF-8?q?=E3=81=A7=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E5=87=BA=E3=82=8B?=
=?UTF-8?q?=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3=20https://github.com/NetCo?=
=?UTF-8?q?mmons3/NetCommons3/issues/1618?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 4e2074e..554bf95 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@ php:
- 7.0
- 7.1
- 7.2
- - 7.3
+ - 7.3.24
- 7.4
sudo: false
From 14fb706325300a2acf49faaea3ee86e7ce698c02 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 23 Jan 2021 14:05:41 +0900
Subject: [PATCH 13/24] =?UTF-8?q?add:=20release=E3=82=BF=E3=82=B0=E4=BB=98?=
=?UTF-8?q?=E3=81=91=E3=81=AEgithub=20action=E3=82=92=E8=BF=BD=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/NetCommons3/NetCommons3/issues/1619
---
.github/workflows/release.yml | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 .github/workflows/release.yml
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..a3225bc
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,28 @@
+on:
+ push:
+ # Sequence of patterns matched against refs/tags
+ tags:
+ - '3*'
+
+name: Create Release
+
+jobs:
+ build:
+ name: Create Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ with:
+ tag_name: ${{ github.ref }}
+ release_name: ${{ github.ref }}
+ body: |
+ NetCommons ${{ github.ref }} released.
+ draft: false
+ prerelease: false
From 72a02f86198c7dc99d4ad127110e14e2912ebba6 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 23 Jan 2021 14:05:48 +0900
Subject: [PATCH 14/24] change: Version number to 3.3.3
---
VERSION.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.txt b/VERSION.txt
index 4772543..619b537 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-3.3.2
+3.3.3
From f28ac86267007971218f4a448f2d1c2474a9f224 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sat, 31 Jul 2021 17:10:11 +0900
Subject: [PATCH 15/24] =?UTF-8?q?change:=20test:=20TravisCI=E3=81=8B?=
=?UTF-8?q?=E3=82=89GithubAction=E3=81=AB=E5=A4=89=E6=9B=B4=20https://gith?=
=?UTF-8?q?ub.com/NetCommons3/NetCommons3/issues/1650?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/tests.yml | 137 +++++++++++++++++++
.travis.yml | 42 ------
Model/Behavior/SystemManagerSaveBehavior.php | 2 +-
Model/SiteSetting.php | 2 +-
README.md | 11 +-
phpunit.xml.dist | 4 +-
6 files changed, 143 insertions(+), 55 deletions(-)
create mode 100644 .github/workflows/tests.yml
delete mode 100644 .travis.yml
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..d6bd01e
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,137 @@
+on:
+ push:
+ branches:
+ - main
+ - master
+ - availability
+ pull_request:
+ branches:
+ - main
+ - master
+ - availability
+
+name: tests
+
+jobs:
+ tests:
+ name: tests
+ runs-on: ubuntu-18.04
+ strategy:
+ matrix:
+ php: [ '7.1', '7.2', '7.3', '7.4' ]
+
+ env:
+ NC3_BUILD_DIR: "/opt/nc3"
+ NC3_DOCKER_DIR: "/opt/docker"
+ NC3_GIT_URL: "git://github.com/NetCommons3/NetCommons3.git"
+ NC3_GIT_BRANCH: "master"
+ PLUGIN_BUILD_DIR: ${{ github.workspace }}
+ PHP_VERSION: ${{ matrix.php }}
+ MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: cakephp_test
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: environment
+ run: |
+ echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"
+ echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}"
+ echo "PHP_VERSION=${PHP_VERSION}"
+ ls -al ${PLUGIN_BUILD_DIR}
+
+ - name: docker-compose install
+ run: |
+ curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
+ chmod +x ~/docker-compose
+ sudo mv ~/docker-compose /usr/local/bin/docker-compose
+ docker-compose --version
+
+ - name: git clone nc3
+ run: git clone -b ${NC3_GIT_BRANCH} ${NC3_GIT_URL} ${NC3_BUILD_DIR}
+
+ - name: git clone nc3_docker
+ run: git clone https://github.com/NetCommons3/nc3app-docker.git ${NC3_DOCKER_DIR}
+
+ - name: docker-compose start
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose up -d
+ docker-compose start
+
+ - run: docker ps
+
+ - name: check libraries
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/start-on-docker.sh
+
+ - name: nc3 build
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/app-build.sh
+
+ - name: phpcs (PHP CodeSniffer)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh
+
+ - name: phpmd (PHP Mess Detector)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh
+
+ - name: phpcpd (PHP Copy/Paste Detector)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh
+
+ - name: gjslint (JavaScript Style Check)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh
+
+ - name: phpdoc (PHP Documentor)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh
+
+ - name: phpunit (PHP UnitTest)
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh
+ sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build
+
+ - name: push coveralls
+ env:
+ COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COVERALLS_FLAG_NAME: ${{ matrix.php }}
+ run: |
+ cd ${NC3_BUILD_DIR}
+ ls -la ${NC3_BUILD_DIR}
+ vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
+
+ - name: docker-compose remove
+ run: |
+ cd ${NC3_DOCKER_DIR}
+ docker-compose rm -f
+
+ # テスト成功時はこちらのステップが実行される
+ - name: Slack Notification on Success
+ if: success()
+ uses: rtCamp/action-slack-notify@v2.2.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+ SLACK_CHANNEL: notify-netcommons3
+ SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})"
+ SLACK_COLOR: good
+
+ # テスト失敗時はこちらのステップが実行される
+ - name: Slack Notification on Failure
+ uses: rtCamp/action-slack-notify@v2.2.0
+ if: failure()
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+ SLACK_CHANNEL: notify-netcommons3
+ SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})"
+ SLACK_COLOR: danger
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 554bf95..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-language: php
-
-php:
- - 7.0
- - 7.1
- - 7.2
- - 7.3.24
- - 7.4
-
-sudo: false
-dist: trusty
-
-env:
- matrix:
- - NETCOMMONS_VERSION=master DB=mysql
- global:
- - secure: "h6sSqr4r8WDkKFHHu5fdjav1V2P4aZ9JY/422gXmyYJeAEVxXcnVN02jwNlR+M+vZ3fbKjJbr4tYqdKQ/DB29z0dGXFoPeaMhfkdEGdFIRYUTQm4Qb2jCYjLbRSRq2Y/KdX7SkaZqqkRiTSB1OSedYU9SmPEKs+WV3IbLSzAlohhGTRoMh6+RCkxkEH/LnW1rTPv6N+cehSZlGLIvg1//4Jy8yAiHDRmY9NIoZ1N8jdOOKkGIQu4f3u108qr8DxSP5Q4MkVLgcDUYGHYuE/w5/nVGTMeD4QCjnYCDZVqEFpKWz0qquKJR+ygWR7D+oqfXvAOK8NJbk1GDsSgHBBHAnrdUJy7d9hpQ5hrzP4czXKWmLlg4rbSfdnUQKTH4857jn23KGH79ARcYE0j/qDC0tr7AmzVsLqQbarJXNUke8oPPbnBt+6pkPV7O4ocB1hgSXYgwpv/sCRaBpQHSl4+XGFG/VWRQHXtVTOS6IDjzsRlxz1MC3YtQl4hNQpp6K9VwWem5D4u8cMx6Q4yiB35nI+vTdF/l0uPK/miyqPOdjuCkviIFpacRwRuGbI1P5VNLBxuxE7iboA7ugeWk14Vy71ZrXd7S7eEhQDi390/qt/8fuA8LxuCM/unCwgA3VBH7OpLmlC4mFpM00oNxSsqeftEwhjmwAM01rpLQexyTcU="
- - GIT_COMMITTER_NAME=s-nakajima
- - GIT_COMMITTER_EMAIL=nakajimashouhei@gmail.com
- - GIT_AUTHOR_NAME=s-nakajima
- - GIT_AUTHOR_EMAIL=nakajimashouhei@gmail.com
-
-before_script:
- - export NETCOMMONS_BUILD_DIR=`dirname $TRAVIS_BUILD_DIR`/NetCommons3
- - git clone git://github.com/NetCommons3/NetCommons3 $NETCOMMONS_BUILD_DIR
- - cd $NETCOMMONS_BUILD_DIR
- - git checkout $NETCOMMONS_VERSION
- - travis_wait . tools/build/plugins/cakephp/travis/pre.sh
- - . tools/build/plugins/cakephp/travis/environment.sh
-
-script:
- - . tools/build/plugins/cakephp/travis/main.sh
-
-after_script:
- - . tools/build/plugins/cakephp/travis/post.sh
-
-notifications:
- email:
- recipients:
- - netcommons3@googlegroups.com
- on_success: never # default: change
- on_failure: always # default: always
diff --git a/Model/Behavior/SystemManagerSaveBehavior.php b/Model/Behavior/SystemManagerSaveBehavior.php
index 8cbf898..dc51c0a 100644
--- a/Model/Behavior/SystemManagerSaveBehavior.php
+++ b/Model/Behavior/SystemManagerSaveBehavior.php
@@ -49,7 +49,7 @@ public function saveRoomDiskSize(Model $model, $data) {
$value = null;
}
$model->Space->id = $spaceId;
- if (! $model->Space->saveField('room_disk_size', $value)) {
+ if (! $model->Space->saveField('room_disk_size', $value, ['callbacks' => false])) {
throw new InternalErrorException(__d('net_commons', 'Internal Server Error'));
}
$model->Space->cacheClear();
diff --git a/Model/SiteSetting.php b/Model/SiteSetting.php
index e8ae9b5..e396fe9 100644
--- a/Model/SiteSetting.php
+++ b/Model/SiteSetting.php
@@ -494,7 +494,7 @@ public function saveSiteSettingByKey($key, $value) {
$this->id = $siteSetting['SiteSetting']['id'];
//登録処理
- if (! $this->SiteSetting->saveField('value', $value)) {
+ if (! $this->SiteSetting->saveField('value', $value, ['callbacks' => false])) {
throw new InternalErrorException(__d('net_commons', 'Internal Server Error'));
}
diff --git a/README.md b/README.md
index 474f6db..9446260 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,6 @@
SiteManager
==============
-
-SiteManager for NetComomns3
-[](https://travis-ci.org/NetCommons3/SiteManager)
-[](https://coveralls.io/r/NetCommons3/SiteManager?branch=master)
-
-| dependencies | status |
-| ------------- | ------ |
-| composer.json | [](https://www.versioneye.com/user/projects/56738e8184f9b4000c0011e9) |
+[](https://github.com/NetCommons3/SiteManager/actions/workflows/tests.yml)
+[](https://coveralls.io/r/NetCommons3/SiteManager?branch=master)
+[](https://packagist.org/packages/netcommons/site-manager)
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b54a661..01fe4d6 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,9 +3,6 @@
-
-
-
app/Plugin/SiteManager
@@ -20,5 +17,6 @@
+
From 44324a72ab1723b52ce9ac64ddf3b5e94a3f1133 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Wed, 11 Aug 2021 14:45:41 +0900
Subject: [PATCH 16/24] =?UTF-8?q?change:=20test:=20Slack=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E4=BF=AE=E6=AD=A3,=20mysql8.0=E3=83=86=E3=82=B9=E3=83=88?=
=?UTF-8?q?=E8=BF=BD=E5=8A=A0=20https://github.com/NetCommons3/NetCommons3?=
=?UTF-8?q?/issues/1650?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/release.yml | 35 ++++++++++++++++++++++++--
.github/workflows/tests.yml | 47 +++++++++++++++++++++++++----------
2 files changed, 67 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a3225bc..592d72f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -4,16 +4,25 @@ on:
tags:
- '3*'
-name: Create Release
+name: create_release
jobs:
build:
- name: Create Release
+ name: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
+ - name: Slack Notification on Start
+ uses: rtCamp/action-slack-notify@v2.2.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
+ SLACK_CHANNEL: notify-nc3-release
+ SLACK_TITLE: "${{ github.repository }}"
+ SLACK_COLOR: "#f0ad4e"
+ SLACK_MESSAGE: "Start Job"
+
- name: Create Release
id: create_release
uses: actions/create-release@v1
@@ -26,3 +35,25 @@ jobs:
NetCommons ${{ github.ref }} released.
draft: false
prerelease: false
+
+ # テスト成功時はこちらのステップが実行される
+ - name: Slack Notification on Finish
+ uses: rtCamp/action-slack-notify@v2.2.0
+ if: success()
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
+ SLACK_CHANNEL: notify-nc3-release
+ SLACK_TITLE: "${{ github.repository }}"
+ SLACK_COLOR: good
+ SLACK_MESSAGE: "Job Success"
+
+ # テスト失敗時はこちらのステップが実行される
+ - name: Slack Notification on Failure
+ uses: rtCamp/action-slack-notify@v2.2.0
+ if: failure()
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
+ SLACK_CHANNEL: notify-nc3-tests
+ SLACK_TITLE: "${{ github.repository }}"
+ SLACK_COLOR: danger
+ SLACK_MESSAGE: "Job Failure"
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d6bd01e..1477ea2 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -13,12 +13,26 @@ on:
name: tests
jobs:
+ setup:
+ name: setup
+ runs-on: ubuntu-18.04
+ steps:
+ - name: Slack Notification on Start
+ uses: rtCamp/action-slack-notify@v2.2.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
+ SLACK_CHANNEL: notify-nc3-tests
+ SLACK_TITLE: "${{ github.repository }}"
+ SLACK_COLOR: "#f0ad4e"
+
tests:
name: tests
+ needs: setup
runs-on: ubuntu-18.04
strategy:
matrix:
php: [ '7.1', '7.2', '7.3', '7.4' ]
+ mysql: [ '5.7', '8.0' ]
env:
NC3_BUILD_DIR: "/opt/nc3"
@@ -27,6 +41,7 @@ jobs:
NC3_GIT_BRANCH: "master"
PLUGIN_BUILD_DIR: ${{ github.workspace }}
PHP_VERSION: ${{ matrix.php }}
+ MYSQL_VERSION: ${{ matrix.mysql }}
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: cakephp_test
@@ -38,6 +53,7 @@ jobs:
echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"
echo "PLUGIN_BUILD_DIR=${PLUGIN_BUILD_DIR}"
echo "PHP_VERSION=${PHP_VERSION}"
+ echo "MYSQL_VERSION=${MYSQL_VERSION}"
ls -al ${PLUGIN_BUILD_DIR}
- name: docker-compose install
@@ -116,22 +132,27 @@ jobs:
cd ${NC3_DOCKER_DIR}
docker-compose rm -f
- # テスト成功時はこちらのステップが実行される
- - name: Slack Notification on Success
- if: success()
- uses: rtCamp/action-slack-notify@v2.2.0
- env:
- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- SLACK_CHANNEL: notify-netcommons3
- SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})"
- SLACK_COLOR: good
-
# テスト失敗時はこちらのステップが実行される
- name: Slack Notification on Failure
uses: rtCamp/action-slack-notify@v2.2.0
if: failure()
env:
- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- SLACK_CHANNEL: notify-netcommons3
- SLACK_TITLE: "${{ github.repository }}(${{ matrix.php }})"
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
+ SLACK_CHANNEL: notify-nc3-tests
+ SLACK_TITLE: "${{ github.repository }}(php${{ matrix.php }}, mysql${{ matrix.mysql }})"
SLACK_COLOR: danger
+
+ teardown:
+ name: teardown
+ runs-on: ubuntu-18.04
+ needs: tests
+ steps:
+ # テスト成功時はこちらのステップが実行される
+ - name: Slack Notification on Success
+ if: success()
+ uses: rtCamp/action-slack-notify@v2.2.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
+ SLACK_CHANNEL: notify-nc3-tests
+ SLACK_TITLE: "${{ github.repository }}"
+ SLACK_COLOR: good
From 3759f5be7c5b69c9a85f15436650cfab47e12b62 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 13 Aug 2021 18:31:44 +0900
Subject: [PATCH 17/24] change: Version number to 3.3.4
---
VERSION.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.txt b/VERSION.txt
index 619b537..a0891f5 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-3.3.3
+3.3.4
From 41bf3f503b768a173933024fe0d83c72fb888911 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Tue, 9 Nov 2021 12:57:25 +0900
Subject: [PATCH 18/24] =?UTF-8?q?fix:=20=E3=80=8CCopyright=20=C2=A9?=
=?UTF-8?q?=E3=80=8D=E3=81=AF=E9=87=8D=E8=A4=87=E8=A1=A8=E7=8F=BE=E3=81=A7?=
=?UTF-8?q?=E3=81=82=E3=82=8B=E3=81=9F=E3=82=81=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Config/Migration/1469687773_site_manager_records.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Config/Migration/1469687773_site_manager_records.php b/Config/Migration/1469687773_site_manager_records.php
index e77aee5..e21e7cb 100644
--- a/Config/Migration/1469687773_site_manager_records.php
+++ b/Config/Migration/1469687773_site_manager_records.php
@@ -180,7 +180,7 @@ class SiteManagerRecords extends NetCommonsMigration {
array(
'language_id' => 0,
'key' => 'Meta.copyright',
- 'value' => 'Copyright © 2016',
+ 'value' => 'Copyright 2016',
),
// * キーワード
array(
From f8849bc8abe7f9d68e7f755e301988f9615a65f3 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 14 Nov 2021 17:19:27 +0900
Subject: [PATCH 19/24] comment: Change release tags.
---
.github/workflows/release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 592d72f..c55f5d1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -32,7 +32,7 @@ jobs:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
- NetCommons ${{ github.ref }} released.
+ ${{ github.ref }} released.
draft: false
prerelease: false
From d9c8ce10f3ebe9b1bfd420e5c6637baf94b67b2b Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 11 Feb 2022 22:25:32 +0900
Subject: [PATCH 20/24] change: Version number to 3.3.5
---
VERSION.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.txt b/VERSION.txt
index a0891f5..fa7adc7 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-3.3.4
+3.3.5
From 6a8f80be94aaffa2d98f65ba1d60de169dad41ce Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 24 Feb 2023 17:00:10 +0900
Subject: [PATCH 21/24] =?UTF-8?q?test:=20Github=20Action=E3=82=A8=E3=83=A9?=
=?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/tests.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 1477ea2..7cfa881 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -44,10 +44,14 @@ jobs:
MYSQL_VERSION: ${{ matrix.mysql }}
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: cakephp_test
+ COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
+ - name: Fix up git URLs
+ run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig
+
- name: environment
run: |
echo "GITHUB_WORKSPACE=${GITHUB_WORKSPACE}"
@@ -58,7 +62,7 @@ jobs:
- name: docker-compose install
run: |
- curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
+ curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose
docker-compose --version
From 81a96e586cb0395584ae90c42fab0da67237f3c9 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Sun, 26 Feb 2023 07:03:22 +0900
Subject: [PATCH 22/24] change: Version number to 3.3.6
---
VERSION.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.txt b/VERSION.txt
index fa7adc7..9c25013 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-3.3.5
+3.3.6
From d5c1b260e3e52e1e5f56d3ecb2b70c1ffa4d5102 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Fri, 6 Oct 2023 09:21:30 +0900
Subject: [PATCH 23/24] =?UTF-8?q?test:=20github=20action=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/tests.yml | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 7cfa881..6da4321 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -3,22 +3,21 @@ on:
branches:
- main
- master
- - availability
pull_request:
branches:
- main
- master
- - availability
name: tests
jobs:
setup:
name: setup
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
steps:
- name: Slack Notification on Start
uses: rtCamp/action-slack-notify@v2.2.0
+ if: env.SLACK_WEBHOOK != ''
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
SLACK_CHANNEL: notify-nc3-tests
@@ -28,7 +27,7 @@ jobs:
tests:
name: tests
needs: setup
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.1', '7.2', '7.3', '7.4' ]
@@ -92,46 +91,53 @@ jobs:
docker-compose exec -T nc3app bash /opt/scripts/app-build.sh
- name: phpcs (PHP CodeSniffer)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/phpcs.sh
- name: phpmd (PHP Mess Detector)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/phpmd.sh
- name: phpcpd (PHP Copy/Paste Detector)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/phpcpd.sh
- name: gjslint (JavaScript Style Check)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/gjslint.sh
- name: phpdoc (PHP Documentor)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/phpdoc.sh
- name: phpunit (PHP UnitTest)
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose exec -T nc3app bash /opt/scripts/phpunit.sh
sudo -s chmod a+w -R ${NC3_BUILD_DIR}/build
- - name: push coveralls
- env:
- COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- COVERALLS_FLAG_NAME: ${{ matrix.php }}
- run: |
- cd ${NC3_BUILD_DIR}
- ls -la ${NC3_BUILD_DIR}
- vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
+# - name: push coveralls
+# env:
+# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+# COVERALLS_FLAG_NAME: ${{ matrix.php }}
+# run: |
+# cd ${NC3_BUILD_DIR}
+# ls -la ${NC3_BUILD_DIR}
+# vendors/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: docker-compose remove
+ if: always()
run: |
cd ${NC3_DOCKER_DIR}
docker-compose rm -f
@@ -139,7 +145,7 @@ jobs:
# テスト失敗時はこちらのステップが実行される
- name: Slack Notification on Failure
uses: rtCamp/action-slack-notify@v2.2.0
- if: failure()
+ if: env.SLACK_WEBHOOK != '' && failure()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
SLACK_CHANNEL: notify-nc3-tests
@@ -148,13 +154,13 @@ jobs:
teardown:
name: teardown
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
needs: tests
steps:
# テスト成功時はこちらのステップが実行される
- name: Slack Notification on Success
- if: success()
uses: rtCamp/action-slack-notify@v2.2.0
+ if: env.SLACK_WEBHOOK != '' && success()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_TESTS }}
SLACK_CHANNEL: notify-nc3-tests
From 45d1ccca9d9c44b57264e299c0b1ff11aa095678 Mon Sep 17 00:00:00 2001
From: s-nakajima
Date: Tue, 10 Oct 2023 00:00:32 +0900
Subject: [PATCH 24/24] change: Version number to 3.3.7
---
VERSION.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.txt b/VERSION.txt
index 9c25013..86fb650 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-3.3.6
+3.3.7