Skip to content

Commit

Permalink
Update: Don't compress the Resources folder, just upload it via rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Feb 24, 2021
1 parent c9fce8a commit 4bebfe4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions functions/files.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
*/
function uploadPersistentResources(): void
{
runLocally("COPYFILE_DISABLE=1 tar cfz Resources.tgz Data/Persistent/Resources", ['timeout' => null]);
upload('Resources.tgz', '{{deploy_path}}/shared');

// Decompress the Neos resources on the server and delete the compressed files
cd('{{deploy_path}}/shared');
run('tar xf Resources.tgz', ['timeout' => null]);
run('rm -f Resources.tgz');
runLocally('rm -f Resources.tgz');
$folder = parse('{{release_path}}/Data/Persistent');
if (!test("[ -d $folder ]")) {
run("mkdir -p $folder");
}

upload('Data/Persistent/Resources', $folder);
$group = run('id -g -n');
cd('{{release_path}}/Data/Persistent/Resources');
writeln('Setting file permissions per file, this might take a while ...');
Expand All @@ -31,7 +28,8 @@ function uploadPersistentResources(): void
*
* @return void
*/
function importSiteFromXml(): void {
function importSiteFromXml(): void
{
$path = '{{release_path}}/DistributionPackages';
if (test("[ -d $path ]")) {
cd($path);
Expand Down

0 comments on commit 4bebfe4

Please sign in to comment.