From 717d9208c76d837776502ca3b85f28f9e86f2c3b Mon Sep 17 00:00:00 2001 From: djmaze Date: Wed, 23 Sep 2020 15:12:22 +0200 Subject: [PATCH] Fix compressing to gzip and brotli --- release.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/release.php b/release.php index 3eaf1072d..83af7fb39 100755 --- a/release.php +++ b/release.php @@ -21,15 +21,18 @@ if ($return_var) { exit("gulp failed with error code {$return_var}\n"); } +$cmddir = escapeshellcmd(__DIR__) . '/rainloop/v/0.0.0/static'; + if ($gzip = trim(`which gzip`)) { - passthru("{$gzip} -k --best -r ".escapeshellarg(__DIR__ . '/rainloop/v/0.0.0/static/js/*.js'), $return_var); - passthru("{$gzip} -k --best -r ".escapeshellarg(__DIR__ . '/rainloop/v/0.0.0/static/css/app*.css'), $return_var); + passthru("{$gzip} -k --best {$cmddir}/js/*.js"); + passthru("{$gzip} -k --best {$cmddir}/js/min/*.js"); + passthru("{$gzip} -k --best {$cmddir}/css/app*.css"); } if ($brotli = trim(`which brotli`)) { - passthru("{$brotli} -k --best ".escapeshellarg(__DIR__ . '/rainloop/v/0.0.0/static/js/*.js'), $return_var); - passthru("{$brotli} -k --best ".escapeshellarg(__DIR__ . '/rainloop/v/0.0.0/static/js/min/*.js'), $return_var); - passthru("{$brotli} -k --best ".escapeshellarg(__DIR__ . '/rainloop/v/0.0.0/static/css/app*.css'), $return_var); + passthru("{$brotli} -k --best {$cmddir}/js/*.js"); + passthru("{$brotli} -k --best {$cmddir}/js/min/*.js"); + passthru("{$brotli} -k --best {$cmddir}/css/app*.css"); } // Temporary rename folder to speed up PharData