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)