Fix release script to better support local development

This commit is contained in:
Floris Westerman 2020-11-26 15:10:43 +01:00
parent 5633998f0f
commit e0462af9da
No known key found for this signature in database
GPG key ID: E2AED138B92702B0

View file

@ -59,7 +59,7 @@ $tar = new PharData($tar_destination);
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('snappymail/v'), RecursiveIteratorIterator::SELF_FIRST); $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('snappymail/v'), RecursiveIteratorIterator::SELF_FIRST);
foreach ($files as $file) { foreach ($files as $file) {
$file = str_replace('\\', '/', $file); $file = str_replace('\\', '/', $file);
echo "{$file}\n"; //echo "{$file}\n";
// Ignore "." and ".." folders // Ignore "." and ".." folders
if (!in_array(substr($file, strrpos($file, '/')+1), array('.', '..'))) { if (!in_array(substr($file, strrpos($file, '/')+1), array('.', '..'))) {
if (is_dir($file)) { if (is_dir($file)) {
@ -70,7 +70,7 @@ foreach ($files as $file) {
} }
} }
$tar->buildFromDirectory('./', "@snappymail/v/{$package->version}@"); $tar->buildFromDirectory('./snappymail/', "@v/{$package->version}@");
$zip->addFile('data/.htaccess'); $zip->addFile('data/.htaccess');
$tar->addFile('data/.htaccess'); $tar->addFile('data/.htaccess');