From 60df37d9d8a1a5ab286cfbb3e95995940640e6d7 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 2 Sep 2025 15:54:38 +0200 Subject: [PATCH] MDL-83424: Release detection across branches --- release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index 156bc54..9f8afb2 100755 --- a/release.sh +++ b/release.sh @@ -122,12 +122,13 @@ output output "${normal}You are about to push:" for b in "${allbranches[@]}" ; do versionpath=version.php - if [ ! -f $versionpath ]; then + git cat-file -e origin/${b}:$versionpath > /dev/null 2>&1 + if [ $? -ne 0 ]; then versionpath=public/version.php fi # Search for a 'real' release by ensuring the top commit on version.php changes $release and was recent. - releasebumped=$(git show --since='8 hours ago' -n1 origin/${b} $versionpath | grep "+\$release\s*=\s*") + releasebumped=$(git show --since='8 hours ago' -n1 origin/${b} -- $versionpath | grep "+\$release\s*=\s*") if [[ -n ${releasebumped} || $_skip_version_check ]]; then output "${G}$b: ${normal}$(git log -n1 --pretty=format:"%s (%an %ar)" origin/$b)" # Check if between the last commit in the branch and now, it has been PUBLISHING_TIME (UTC)