From 025f8b9dc37a5ea3960b556c15a8d6796d8195e2 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 7 Dec 2022 17:31:21 +0100 Subject: [PATCH] =?UTF-8?q?:hammer:=20N=C2=B05633=20update-xml.php=20:=20i?= =?UTF-8?q?f=20no=20version=20passed,=20assuming=20current=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .make/release/update-xml.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.make/release/update-xml.php b/.make/release/update-xml.php index 42e73a73d..357919e88 100644 --- a/.make/release/update-xml.php +++ b/.make/release/update-xml.php @@ -9,9 +9,13 @@ * * Usage : * `php .make\release\update-xml.php "1.7"` + * `php .make\release\update-xml.php` + * + * If no parameter provided then the current XML version will be used as target version * * @since 2.7.0 simple version change using regexp (not doing conversion) * @since 3.1.0 N°5405 now does a real conversion + * @since 3.1.0 N°5633 allow to use without parameter ******************************************************************************/ @@ -23,10 +27,12 @@ require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php'); if (count($argv) === 1) { - echo '/!\ You must pass the new version as parameter'; - exit(1); + echo '/!\ No version passed: assuming target XML version is current XML version ('.ITOP_DESIGN_LATEST_VERSION.")\n"; + $sVersionLabel = ITOP_DESIGN_LATEST_VERSION; +} else { + $sVersionLabel = $argv[1]; } -$sVersionLabel = $argv[1]; + if (empty($sVersionLabel)) { echo 'Version passed as parameter is empty !';