From 064181815eaaa7c173e02a038985a57709cca426 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Mon, 21 Jun 2021 11:47:56 +0000 Subject: [PATCH] Fixes #3629: Updating package-based installations can break the front end. --- .pkgr.yml | 1 + contrib/packager.io/preinstall.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 contrib/packager.io/preinstall.sh diff --git a/.pkgr.yml b/.pkgr.yml index d0e9c4db2..2a9afa6da 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -116,4 +116,5 @@ env: - ZAMMAD_WEBSOCKET_PORT=6042 services: - postgres +before_install: contrib/packager.io/preinstall.sh after_install: contrib/packager.io/postinstall.sh diff --git a/contrib/packager.io/preinstall.sh b/contrib/packager.io/preinstall.sh new file mode 100755 index 000000000..00940c560 --- /dev/null +++ b/contrib/packager.io/preinstall.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# packager.io preinstall script +# + +# +# Make sure that after installation/update there can be only one sprockets manifest, +# the one coming from the package. The package manager will ignore any duplicate files +# which might come from a backup restore and/or a manual 'assets:precompile' command run. +# These duplicates can cause the application to fail, however. +# +rm -f /opt/zammad/public/assets/.sprockets-manifest-*.json || true \ No newline at end of file