mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Make 'snappymail/v/' path dynamic for cleaner Nextcloud paths
This commit is contained in:
parent
35f37381ae
commit
538f752fbe
4 changed files with 14 additions and 12 deletions
|
|
@ -13,8 +13,9 @@ $nc_tar->buildFromDirectory('./integrations/nextcloud', "@integrations/nextcloud
|
|||
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('snappymail/v'), RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($files as $file) {
|
||||
if (is_file($file)) {
|
||||
$file = str_replace('\\', '/', $file);
|
||||
$nc_tar->addFile($file, "snappymail/app/{$file}");
|
||||
$newFile = str_replace('\\', '/', $file);
|
||||
$newFile = str_replace("'snappymail/v/'.", '', $newFile);
|
||||
$nc_tar->addFile($file, "snappymail/app/{$newFile}");
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
@ -27,6 +28,7 @@ $nc_tar->addFile('.htaccess', 'snappymail/app/.htaccess');
|
|||
|
||||
$index = file_get_contents('index.php');
|
||||
$index = str_replace('0.0.0', $package->version, $index);
|
||||
$index = str_replace('snappymail/v/', '', $index);
|
||||
$nc_tar->addFromString('snappymail/app/index.php', $index);
|
||||
$nc_tar->addFile('README.md', 'snappymail/app/README.md');
|
||||
$nc_tar->addFile('CHANGELOG.md', 'snappymail/CHANGELOG.md');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue