public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Brian J. Murrell <brian@interlinx.bc.ca>
To: git-commits@fedoraproject.org
Subject: [rpms/nextcloud] epel10.2: Dynamically determine which .map file to update the occ upgrade command in
Date: Fri, 26 Jun 2026 19:55:56 GMT	[thread overview]
Message-ID: <178250375639.1.3705358155705763575.rpms-nextcloud-db98a32e0976@fedoraproject.org> (raw)

            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}

                 reply	other threads:[~2026-06-26 19:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178250375639.1.3705358155705763575.rpms-nextcloud-db98a32e0976@fedoraproject.org \
    --to=brian@interlinx.bc.ca \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox