From 8b9589744bd171d28c9d5be3c32e73f9c7ab3aec Mon Sep 17 00:00:00 2001 From: acognet Date: Mon, 28 Jun 2021 13:55:41 +0200 Subject: [PATCH 1/4] =?UTF-8?q?N=C2=B04020=20-=20timeout=20on=20updating?= =?UTF-8?q?=20the=20hierarchical=20key=20during=20setup=20-=20php=205.6=20?= =?UTF-8?q?compatibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/compiler.class.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index f52da63487..225d4c9cf1 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -56,6 +56,7 @@ class MFCompiler * If this file is present, then we don't recalculate hkeys * * @var string + * @since 2.7.5 3.0.0 N°4020 */ public const REBUILD_HKEYS_NEVER= APPROOT.'data/.setup-rebuild-hkeys-never'; @@ -112,9 +113,9 @@ public function GetLog() * @uses \file_exists() * @uses REBUILD_HKEYS_NEVER * - * @since 2.7.5 + * @since 2.7.5 3.0.0 */ - public static function SkipRebuildHKeys(): bool + public static function SkipRebuildHKeys() { return (file_exists(static::REBUILD_HKEYS_NEVER)); } From b5074c4ceea3740bba5eb5b1c2752184f5f27271 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 28 Jun 2021 14:35:34 +0200 Subject: [PATCH 2/4] =?UTF-8?q?N=C2=B03806=20Fix=20saying=20memory=5Flimit?= =?UTF-8?q?=20isn't=20enough=20in=20CLI=20scripts=20and=20setup=20This=20w?= =?UTF-8?q?as=20caused=20by=20the=20strict=20comparison=20in=20\utils::IsM?= =?UTF-8?q?emoryLimitOk=20for=20the=20special=20"-1"=20value=20of=20memory?= =?UTF-8?q?=5Flimit,=20which=20was=20added=20in=20c2f5cafa.=20Fix=20was=20?= =?UTF-8?q?to=20change=20\utils::ConvertToBytes=20:=20it=20was=20returning?= =?UTF-8?q?=20original=20value=20when=20input=20was=20numeric=20(so=20if?= =?UTF-8?q?=20input=20is=20'-1'=20output=20was=20'-1')=20=20now=20it=20alw?= =?UTF-8?q?ays=20returns=20an=20int=20(input=20'-1'=20output=20-1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/utils.inc.php | 12 +++++++----- test/application/UtilsTest.php | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/application/utils.inc.php b/application/utils.inc.php index 806cce74cc..c14f340b5a 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -571,16 +571,16 @@ public static function ReadFromFile($sFileName) } /** - * Helper function to convert a value expressed in a 'user friendly format' - * as in php.ini, e.g. 256k, 2M, 1G etc. Into a number of bytes + * @param mixed $value The value as read from php.ini (eg 256k, 2M, 1G etc.) * - * @param mixed $value The value as read from php.ini + * @return int conversion to number of bytes * - * @return number + * @since 2.7.5 3.0.0 convert to int numeric values + * + * @link https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes Shorthand bytes value reference in PHP.net FAQ */ public static function ConvertToBytes($value) { - $iReturn = $value; if (!is_numeric($value)) { $iLength = strlen($value); $iReturn = substr($value, 0, $iLength - 1); @@ -593,6 +593,8 @@ public static function ConvertToBytes($value) case 'K': $iReturn *= 1024; } + } else { + $iReturn = (int)$value; } return $iReturn; diff --git a/test/application/UtilsTest.php b/test/application/UtilsTest.php index 1f51b27655..1c43a23802 100644 --- a/test/application/UtilsTest.php +++ b/test/application/UtilsTest.php @@ -436,12 +436,14 @@ public function testConvertToBytes($sExpressionToConvert, $iExpectedConvertedVal { $iCurrentConvertedValue = utils::ConvertToBytes($sExpressionToConvert); self::assertEquals($iExpectedConvertedValue, $iCurrentConvertedValue, 'Converted value wasn\'t the one expected !'); + self::assertSame($iExpectedConvertedValue, $iCurrentConvertedValue, 'Value was converted but not of the expected type'); } public function ConvertToBytesProvider() { return [ - '123' => ['123', 123], + '123 int value' => ['123', 123], + '-1 no limit' => ['-1', -1], '56k' => ['56k', 56 * 1024], '512M' => ['512M', 512 * 1024 * 1024], '2G' => ['2G', 2 * 1024 * 1024 * 1024], From a6aa183e2652332977f8de55b210ca1a5d606dfe Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Mon, 28 Jun 2021 15:03:17 +0200 Subject: [PATCH 3/4] :bookmark: Prepare 2.7.5 --- css/css-variables.scss | 2 +- datamodels/2.x/authent-cas/module.authent-cas.php | 2 +- datamodels/2.x/authent-external/module.authent-external.php | 2 +- datamodels/2.x/authent-ldap/module.authent-ldap.php | 2 +- datamodels/2.x/authent-local/module.authent-local.php | 2 +- datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php | 2 +- datamodels/2.x/itop-attachments/module.itop-attachments.php | 2 +- datamodels/2.x/itop-backup/module.itop-backup.php | 2 +- .../module.itop-bridge-virtualization-storage.php | 2 +- .../2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php | 2 +- datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php | 2 +- datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php | 2 +- datamodels/2.x/itop-config/module.itop-config.php | 2 +- datamodels/2.x/itop-core-update/module.itop-core-update.php | 2 +- .../2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php | 2 +- .../2.x/itop-endusers-devices/module.itop-endusers-devices.php | 2 +- .../itop-files-information/module.itop-files-information.php | 2 +- datamodels/2.x/itop-full-itil/module.itop-full-itil.php | 2 +- datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php | 2 +- .../itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php | 2 +- .../2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php | 2 +- datamodels/2.x/itop-portal-base/module.itop-portal-base.php | 2 +- datamodels/2.x/itop-portal/module.itop-portal.php | 2 +- datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php | 2 +- datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php | 2 +- .../itop-request-mgmt-itil/module.itop-request-mgmt-itil.php | 2 +- datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php | 2 +- .../module.itop-service-mgmt-provider.php | 2 +- datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php | 2 +- .../2.x/itop-sla-computation/module.itop-sla-computation.php | 2 +- datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php | 2 +- datamodels/2.x/itop-tickets/module.itop-tickets.php | 2 +- .../module.itop-virtualization-mgmt.php | 2 +- datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php | 2 +- datamodels/2.x/version.xml | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/css/css-variables.scss b/css/css-variables.scss index 985f446c47..d4885d1906 100644 --- a/css/css-variables.scss +++ b/css/css-variables.scss @@ -17,7 +17,7 @@ */ // Beware the version number MUST be enclosed with quotes otherwise v2.3.0 becomes v2 0.3 .0 -$version: "v2.7.4"; +$version: "v2.7.5"; $approot-relative: "../../../../../" !default; // relative to env-***/branding/themes/***/main.css // Base colors diff --git a/datamodels/2.x/authent-cas/module.authent-cas.php b/datamodels/2.x/authent-cas/module.authent-cas.php index 1fc5c7e4a5..7033e82dcc 100644 --- a/datamodels/2.x/authent-cas/module.authent-cas.php +++ b/datamodels/2.x/authent-cas/module.authent-cas.php @@ -5,7 +5,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-cas/2.7.4', + 'authent-cas/2.7.5', array( // Identification // diff --git a/datamodels/2.x/authent-external/module.authent-external.php b/datamodels/2.x/authent-external/module.authent-external.php index f13186f44e..c7effabab8 100755 --- a/datamodels/2.x/authent-external/module.authent-external.php +++ b/datamodels/2.x/authent-external/module.authent-external.php @@ -27,7 +27,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-external/2.7.4', + 'authent-external/2.7.5', array( // Identification // diff --git a/datamodels/2.x/authent-ldap/module.authent-ldap.php b/datamodels/2.x/authent-ldap/module.authent-ldap.php index b0de6b353b..10e2d052a9 100755 --- a/datamodels/2.x/authent-ldap/module.authent-ldap.php +++ b/datamodels/2.x/authent-ldap/module.authent-ldap.php @@ -9,7 +9,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-ldap/2.7.4', + 'authent-ldap/2.7.5', array( // Identification // diff --git a/datamodels/2.x/authent-local/module.authent-local.php b/datamodels/2.x/authent-local/module.authent-local.php index e16cd643de..0d69984397 100755 --- a/datamodels/2.x/authent-local/module.authent-local.php +++ b/datamodels/2.x/authent-local/module.authent-local.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-local/2.7.4', + 'authent-local/2.7.5', array( // Identification // diff --git a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php index 15b7107ec0..f3aeed4319 100644 --- a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php +++ b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'combodo-db-tools/2.7.4', + 'combodo-db-tools/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-attachments/module.itop-attachments.php b/datamodels/2.x/itop-attachments/module.itop-attachments.php index 4f43254237..838b57291c 100644 --- a/datamodels/2.x/itop-attachments/module.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/module.itop-attachments.php @@ -19,7 +19,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-attachments/2.7.4', + 'itop-attachments/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-backup/module.itop-backup.php b/datamodels/2.x/itop-backup/module.itop-backup.php index 743e5d39af..c93d8dff0d 100644 --- a/datamodels/2.x/itop-backup/module.itop-backup.php +++ b/datamodels/2.x/itop-backup/module.itop-backup.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-backup/2.7.4', + 'itop-backup/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php b/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php index b1ebb728a4..113f3cebc2 100644 --- a/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php +++ b/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-bridge-virtualization-storage/2.7.4', + 'itop-bridge-virtualization-storage/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php b/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php index e1d7c8d11b..682b55b09b 100755 --- a/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php +++ b/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-change-mgmt-itil/2.7.4', + 'itop-change-mgmt-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php b/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php index 0da4d4c081..4d2c22ed84 100755 --- a/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php +++ b/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-change-mgmt/2.7.4', + 'itop-change-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php index 4e25c8eae8..968ab1a33a 100755 --- a/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-config-mgmt/2.7.4', + 'itop-config-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-config/module.itop-config.php b/datamodels/2.x/itop-config/module.itop-config.php index 7f64fe2766..d9f7da94e5 100644 --- a/datamodels/2.x/itop-config/module.itop-config.php +++ b/datamodels/2.x/itop-config/module.itop-config.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-config/2.7.4', + 'itop-config/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-core-update/module.itop-core-update.php b/datamodels/2.x/itop-core-update/module.itop-core-update.php index 29e4e02351..41eb131ecb 100644 --- a/datamodels/2.x/itop-core-update/module.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/module.itop-core-update.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-core-update/2.7.4', + 'itop-core-update/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php b/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php index 51b661362e..c9f2d40453 100755 --- a/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php +++ b/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php @@ -18,7 +18,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-datacenter-mgmt/2.7.4', + 'itop-datacenter-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php b/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php index f3d778041f..9ae9662d57 100644 --- a/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php +++ b/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php @@ -25,7 +25,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-endusers-devices/2.7.4', + 'itop-endusers-devices/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-files-information/module.itop-files-information.php b/datamodels/2.x/itop-files-information/module.itop-files-information.php index e1356fd0f1..0b1b1f1495 100644 --- a/datamodels/2.x/itop-files-information/module.itop-files-information.php +++ b/datamodels/2.x/itop-files-information/module.itop-files-information.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-files-information/2.7.4', + 'itop-files-information/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-full-itil/module.itop-full-itil.php b/datamodels/2.x/itop-full-itil/module.itop-full-itil.php index 2312cbb322..1650d62ebf 100644 --- a/datamodels/2.x/itop-full-itil/module.itop-full-itil.php +++ b/datamodels/2.x/itop-full-itil/module.itop-full-itil.php @@ -6,7 +6,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-full-itil/2.7.4', + 'itop-full-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php b/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php index 92ef054b51..dee4f576ec 100644 --- a/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php +++ b/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php @@ -5,7 +5,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-hub-connector/2.7.4', + 'itop-hub-connector/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php b/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php index 8fe642c93d..9efd14c8a5 100755 --- a/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php +++ b/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-incident-mgmt-itil/2.7.4', + 'itop-incident-mgmt-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php b/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php index 2b6238abfd..1cf070ba51 100755 --- a/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php +++ b/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-knownerror-mgmt/2.7.4', + 'itop-knownerror-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-portal-base/module.itop-portal-base.php b/datamodels/2.x/itop-portal-base/module.itop-portal-base.php index 9951d6bc0f..074386e7ef 100644 --- a/datamodels/2.x/itop-portal-base/module.itop-portal-base.php +++ b/datamodels/2.x/itop-portal-base/module.itop-portal-base.php @@ -20,7 +20,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-portal-base/2.7.4', array( + 'itop-portal-base/2.7.5', array( // Identification 'label' => 'Portal Development Library', 'category' => 'Portal', diff --git a/datamodels/2.x/itop-portal/module.itop-portal.php b/datamodels/2.x/itop-portal/module.itop-portal.php index 4dd53974b8..80a4426653 100644 --- a/datamodels/2.x/itop-portal/module.itop-portal.php +++ b/datamodels/2.x/itop-portal/module.itop-portal.php @@ -20,7 +20,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-portal/2.7.4', array( + 'itop-portal/2.7.5', array( // Identification 'label' => 'Enhanced Customer Portal', 'category' => 'Portal', diff --git a/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php b/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php index fb2a539b57..f1be23d462 100755 --- a/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php +++ b/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-problem-mgmt/2.7.4', + 'itop-problem-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php b/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php index a39f13eade..eeef612520 100755 --- a/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php +++ b/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php @@ -19,7 +19,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-profiles-itil/2.7.4', + 'itop-profiles-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php b/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php index 7e5fb493bc..f11f80812d 100755 --- a/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php +++ b/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-request-mgmt-itil/2.7.4', + 'itop-request-mgmt-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php b/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php index 25813214d6..a97fae6871 100755 --- a/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php +++ b/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-request-mgmt/2.7.4', + 'itop-request-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php b/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php index f91a302489..a2b59ed33d 100755 --- a/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php +++ b/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-service-mgmt-provider/2.7.4', + 'itop-service-mgmt-provider/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php b/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php index 5b3f740f76..f8c8e0e179 100755 --- a/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php +++ b/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-service-mgmt/2.7.4', + 'itop-service-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php b/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php index 6b3e183c9d..8ee6873075 100755 --- a/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php +++ b/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php @@ -18,7 +18,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-sla-computation/2.7.4', + 'itop-sla-computation/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php b/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php index ca43752097..a42390ef0a 100644 --- a/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php +++ b/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php @@ -25,7 +25,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-storage-mgmt/2.7.4', + 'itop-storage-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-tickets/module.itop-tickets.php b/datamodels/2.x/itop-tickets/module.itop-tickets.php index 868e7af70f..e11fe8eca1 100755 --- a/datamodels/2.x/itop-tickets/module.itop-tickets.php +++ b/datamodels/2.x/itop-tickets/module.itop-tickets.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, - 'itop-tickets/2.7.4', + 'itop-tickets/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php b/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php index 688698d68f..f67569b81b 100644 --- a/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php +++ b/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php @@ -16,7 +16,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-virtualization-mgmt/2.7.4', + 'itop-virtualization-mgmt/2.7.5', array( // Identification // diff --git a/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php b/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php index 8b7f703e59..feab63d9cc 100755 --- a/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php +++ b/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-welcome-itil/2.7.4', + 'itop-welcome-itil/2.7.5', array( // Identification // diff --git a/datamodels/2.x/version.xml b/datamodels/2.x/version.xml index 9b6023c060..0a5c7d4400 100755 --- a/datamodels/2.x/version.xml +++ b/datamodels/2.x/version.xml @@ -1,4 +1,4 @@ - 2.7.4 + 2.7.5 From af338de17f6bfed5160f35d5c0df84adac49df0e Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 29 Jun 2021 10:14:47 +0200 Subject: [PATCH 4/4] :hammer: Changelog generation script --- .make/release/changelog.php | 77 +++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .make/release/changelog.php diff --git a/.make/release/changelog.php b/.make/release/changelog.php new file mode 100644 index 0000000000..bd76f9e7b8 --- /dev/null +++ b/.make/release/changelog.php @@ -0,0 +1,77 @@ + + * Bug_ref;Bug_URL;sha1 + * 1234;https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id=1234;949b213f9|b1ca1f263|a1271da74 + * + * + * 2. List of commits sha1/message without bug ref + * Example : + * + * sha1;subject + * a6aa183e2;:bookmark: Prepare 2.7.5 + * + */ + + +if (count($argv) === 1) { + echo '⚠ You must pass the base tag/sha1 as parameter'; + exit(1); +} +$sBaseReference = $argv[1]; + + +//--- Get log +$sGitLogCommand = 'git log --decorate --pretty="%h;%s" --date-order --no-merges '.$sBaseReference.'..HEAD'; +$sGitLogRaw = shell_exec($sGitLogCommand); + + +//--- Analyze log +$aGitLogLines = preg_split('/\n/', trim($sGitLogRaw));; +$aLogLinesWithBugRef = []; +$aLogLineNoBug = []; +foreach ($aGitLogLines as $sLogLine) { + $sBugRef = preg_match('/[nN]°(\d{3,4})/', $sLogLine, $aLineBugRef); + if (($sBugRef === false) || empty($aLineBugRef)) { + $aLogLineNoBug[] = $sLogLine; + continue; + } + + $iBugId = $aLineBugRef[1]; + $sSha = substr($sLogLine, 0, 9); + + if (array_key_exists($iBugId, $aLogLinesWithBugRef)) { + $aBugShaRefs = $aLogLinesWithBugRef[$iBugId]; + $aBugShaRefs[] = $sSha; + $aLogLinesWithBugRef[$iBugId] = $aBugShaRefs; + } else { + $aLogLinesWithBugRef[$iBugId] = [$sSha]; + } +} +$aBugsList = array_keys($aLogLinesWithBugRef); +sort($aBugsList, SORT_NUMERIC); + + +//-- Output results +echo "# Bugs included\n"; +echo "Bug_ref;Bug_URL;sha1\n"; +foreach ($aBugsList as $sBugRef) { + $sShaRefs = implode('|', $aLogLinesWithBugRef[$sBugRef]); + echo "{$sBugRef};https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id={$sBugRef};$sShaRefs\n"; +} +echo "\n"; +echo "# Logs line without bug referenced\n"; +echo "sha1;subject\n"; +foreach ($aLogLineNoBug as $sLogLine) { + echo "$sLogLine\n"; +} \ No newline at end of file