Skip to content

Commit de5e71d

Browse files
authored
Merge pull request #105 from andrewnicols/fixReleaseDetection
MDL-83424: Release detection across branches
2 parents c55daac + 60df37d commit de5e71d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

release.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,13 @@ output
122122
output "${normal}You are about to push:"
123123
for b in "${allbranches[@]}" ; do
124124
versionpath=version.php
125-
if [ ! -f $versionpath ]; then
125+
git cat-file -e origin/${b}:$versionpath > /dev/null 2>&1
126+
if [ $? -ne 0 ]; then
126127
versionpath=public/version.php
127128
fi
128129

129130
# Search for a 'real' release by ensuring the top commit on version.php changes $release and was recent.
130-
releasebumped=$(git show --since='8 hours ago' -n1 origin/${b} $versionpath | grep "+\$release\s*=\s*")
131+
releasebumped=$(git show --since='8 hours ago' -n1 origin/${b} -- $versionpath | grep "+\$release\s*=\s*")
131132
if [[ -n ${releasebumped} || $_skip_version_check ]]; then
132133
output "${G}$b: ${normal}$(git log -n1 --pretty=format:"%s (%an %ar)" origin/$b)"
133134
# Check if between the last commit in the branch and now, it has been PUBLISHING_TIME (UTC)

0 commit comments

Comments
 (0)