Skip to content

Commit 95e3c5a

Browse files
committed
Backport fix of file list check generation
1 parent 1a1f0fb commit 95e3c5a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

build/generate_filelist_xml.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
/**
20-
* \file build/generate_filecheck_xml.php
20+
* \file build/generate_filelist_xml.php
2121
* \ingroup dev
2222
* \brief This script create a xml checksum file
2323
*/
@@ -45,7 +45,7 @@
4545

4646
if (empty($argv[1]))
4747
{
48-
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
48+
print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
4949
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
5050
exit -1;
5151
}
@@ -68,11 +68,20 @@
6868
$i++;
6969
}
7070

71+
// If release is auto, we take current version
72+
$tmpver=explode('-', $release, 2);
73+
if ($tmpver[0] == 'auto')
74+
{
75+
$release=DOL_VERSION;
76+
if ($tmpver[1]) $release.='-'.$tmpver[1];
77+
}
78+
7179
if (empty($includecustom))
7280
{
73-
if (DOL_VERSION != $release)
81+
$tmpver=explode('-', $release, 2);
82+
if (DOL_VERSION != $tmpver[0])
7483
{
75-
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n";
84+
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
7685
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
7786
exit -1;
7887
}

0 commit comments

Comments
 (0)