Exclude .git dir fom package generation

This commit is contained in:
Laurent Destailleur 2022-10-19 17:43:36 +02:00
parent e507eac37d
commit 39daea9755
2 changed files with 2 additions and 1 deletions

View File

@ -293,6 +293,7 @@ foreach my $PROJECT (@PROJECTLIST) {
}
print "Clean $BUILDROOT\n";
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.cache`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.git`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.project`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/.settings`;
$ret=`rm -fr $BUILDROOT/$PROJECTLC/index.php`;

View File

@ -1780,7 +1780,7 @@ if ($dirins && $action == 'generatepackage') {
dol_mkdir($dirofmodule);
}
// Note: We exclude /bin/ to not include the already generated zip
$result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\//', $modulelowercase);
$result = dol_compress_dir($dir, $outputfilezip, 'zip', '/\/bin\/|\.git/', $modulelowercase);
} else {
$result = -1;
}