From 9b5a6f4298f8ffe89527d68f1274ba6a2b461d86 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Aug 2021 02:48:45 +0200 Subject: [PATCH] Fix signature file must be zip if possible --- build/generate_filelist_xml.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index f5d9f64e518..e5f83e42cfc 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -48,17 +48,16 @@ $includecustom=0; $includeconstants=array(); if (empty($argv[1])) { - print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n"; + print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; 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"; exit -1; } -parse_str($argv[1]); $i=0; while ($i < $argc) { if (! empty($argv[$i])) { - parse_str($argv[$i]); + parse_str($argv[$i]); // set all params $release, $includecustom, $includeconstant, $buildzip ... } if (preg_match('/includeconstant=/', $argv[$i])) { $tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str() @@ -237,6 +236,11 @@ fputs($fp, ''."\n"); fputs($fp, ''."\n"); fclose($fp); -print "File ".$outputfile." generated\n"; +if (empty($buildzip)) { + print "File ".$outputfile." generated\n"; +} else { + dol_compress_file($outputfile, $outputfile.'.zip'); + print "File ".$outputfile.".zip generated\n"; +} exit(0);