From f92dca3e590b65c4feee50b3aa0755811aa1d29f Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 15:07:57 -0800 Subject: [PATCH] Mac: handle detached HEAD --- tools/osx/macosx_bundle.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index ace34d70f..6b91654a3 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -447,7 +447,11 @@ function CreateDmg { cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi if [[ -n $CONTINUOUS ]]; then - mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git branch --show-current)_macOS_${CMAKE_BUILD_TYPE}.zip" + BRANCH=$(git branch --show-current) + if test -z "${BRANCH}" + BRANCH=$(git rev-parse --short HEAD) + fi + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_${BRANCH}_macOS_${CMAKE_BUILD_TYPE}.zip" fi }