public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/nextcloud] epel10.2: Dynamically determine which .map file to update the occ upgrade command in
@ 2026-06-26 19:55 Brian J. Murrell
  0 siblings, 0 replies; only message in thread
From: Brian J. Murrell @ 2026-06-26 19:55 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/nextcloud
            Branch : epel10.2
            Commit : db98a32e0976669cc464ff2f69d8b0b69e586662
            Author : Brian J. Murrell <brian@interlinx.bc.ca>
            Date   : 2026-06-09T22:31:01+00:00
            Stats  : +6/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/nextcloud/c/db98a32e0976669cc464ff2f69d8b0b69e586662?branch=epel10.2

            Log:
            Dynamically determine which .map file to update the occ upgrade command in

Currently, the .map file in which the message exists to inform the user
how to run the occ upgrade command is hard-coded.  This can change
from release to release and thus is quite fragile.

Instead, figure out which file to update by searching for the "occ upgrade"
command in all of the .map files and use the result of that search in the
update command.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>

---
diff --git a/nextcloud.spec b/nextcloud.spec
index 818c9c5..6c9d878 100644
--- a/nextcloud.spec
+++ b/nextcloud.spec
@@ -191,7 +191,12 @@ find . -name .gitignore -type f -delete -print
 find . -name .github    -type d -prune -exec rm -r {} \; -print
 
 # fix CLI upgrade advice on splash screen            
-sed -i -e 's#\./\(occ upgrade\)#sudo -u apache php /usr/share/nextcloud/\1#' dist/9396-9396.js.map
+if ! file=$(grep -l 'occ upgrade' dist/*.map); then
+    echo "Could not find the occ upgrade instructions in dist/*.map"
+    exit 1
+fi
+echo "Updating occ upgrade instructions in $file"
+sed -i -e 's#\./\(occ upgrade\)#sudo -u apache php /usr/share/nextcloud/\1#' $file
 
 # prepare package doc
 cp %{SOURCE300} README.%{distro}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-26 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-26 19:55 [rpms/nextcloud] epel10.2: Dynamically determine which .map file to update the occ upgrade command in Brian J. Murrell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox