forked from Wavyzz/dolibarr
Debug v23
This commit is contained in:
@@ -50,6 +50,13 @@ $includeconstants = array();
|
||||
$buildzip = 0;
|
||||
|
||||
if (empty($argv[1])) {
|
||||
print '***** '.$script_file.' *****'."\n";
|
||||
print "Generate the file filelist-x.y.z[-mybuild].xml with signature of files. ";
|
||||
print "This includes the 3 sections:\n";
|
||||
print "- dolibarr_htdocs_dir\n";
|
||||
print "- dolibarr_scripts_dir\n";
|
||||
print "- dolibarr_unalterable_files (only files inside the scope of the unalterable module)\n";
|
||||
print "\n";
|
||||
print "Usage: ".$script_file." release=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);
|
||||
@@ -97,7 +104,7 @@ $savrelease = $release;
|
||||
$tmpver = explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto') {
|
||||
$release = DOL_VERSION;
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') {
|
||||
if (!empty($tmpver[1]) && $tmpver[0] == 'auto') {
|
||||
$release .= '-'.$tmpver[1];
|
||||
}
|
||||
}
|
||||
@@ -126,10 +133,10 @@ if (empty($includecustom)) {
|
||||
}
|
||||
}
|
||||
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Include custom in signature : ".$includecustom."\n";
|
||||
print "Include constants in signature : ";
|
||||
print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
|
||||
print "Release : ".$release."\n";
|
||||
print "Include custom dir in signature : ".(empty($includecustom) ? 'no' : 'yes')."\n";
|
||||
print "Include constants in signature : ".(empty($includeconstants) ? 'none' : '');
|
||||
foreach ($includeconstants as $countrycode => $tmp) {
|
||||
foreach ($tmp as $constname => $constvalue) {
|
||||
print $constname.'='.$constvalue." ";
|
||||
@@ -155,9 +162,12 @@ $gitcommit = 'seetag';
|
||||
$branchname = preg_replace('/^(\d+\.\d+)\..*$/', '\1', $release); // Keep only x.y into x.y.z
|
||||
$fileforgit = dirname(dirname(dirname(__FILE__))).'/.git/refs/heads/'.$branchname;
|
||||
print "Try to get last commit ID from file ".$fileforgit."\n";
|
||||
$fileforgitcontent = file_get_contents($fileforgit);
|
||||
$fileforgitcontent = '';
|
||||
if (file_exists($fileforgit)) {
|
||||
$fileforgitcontent = file_get_contents($fileforgit);
|
||||
}
|
||||
if (empty($fileforgitcontent)) {
|
||||
print "Failed to get the last commit ID. Are you on the branch for the release (branch name '.$branchname.') ?\n";
|
||||
print "Failed to get the last commit ID. Are you on the branch for the release (branch name ".$branchname.") ?\n";
|
||||
}
|
||||
$gitcommit = trim($fileforgitcontent);
|
||||
|
||||
@@ -350,7 +360,7 @@ if ($newdir != $dir) {
|
||||
}
|
||||
fputs($fp, ' <dir name="'.$newdir.'">'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
//$needtoclose = 1; // close will be done in next filethat is in same dir
|
||||
}
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
@@ -361,7 +371,7 @@ if ($needtoclose) {
|
||||
fputs($fp, ' </dir>'."\n");
|
||||
$needtoclose = 0;
|
||||
}
|
||||
// Add the interfaces.class.php file
|
||||
// Add the commontrigger.class.php file
|
||||
$file = dirname(__FILE__).'/../../htdocs/core/class/commontrigger.class.php';
|
||||
$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
|
||||
$newdir = str_replace(dirname(__FILE__).'/../../htdocs', '', dirname($file));
|
||||
@@ -374,6 +384,8 @@ if ($newdir != $dir) {
|
||||
$dir = $newdir;
|
||||
$needtoclose = 1;
|
||||
}
|
||||
|
||||
$needtoclose = 1; // This is the last file
|
||||
if (filetype($file) == "file") {
|
||||
$md5 = md5_file($file);
|
||||
$checksumconcat[] = $md5;
|
||||
|
||||
@@ -52,6 +52,8 @@ require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php";
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_db_readonly
|
||||
*/
|
||||
|
||||
// Global variables
|
||||
|
||||
Reference in New Issue
Block a user