|
@@ -20,8 +20,8 @@ else
|
|
|
# Capture the current date and write it to BuildDetails.plist
|
|
# Capture the current date and write it to BuildDetails.plist
|
|
|
plutil -replace com-trio-build-date -string "$(date)" "${info_plist_path}"
|
|
plutil -replace com-trio-build-date -string "$(date)" "${info_plist_path}"
|
|
|
|
|
|
|
|
- # Retrieve the current branch, if available
|
|
|
|
|
- git_branch=$(git symbolic-ref --short -q HEAD || echo "")
|
|
|
|
|
|
|
+ # Retrieve the current branch
|
|
|
|
|
+ git_branch=$(git symbolic-ref --short -q HEAD)
|
|
|
|
|
|
|
|
# Attempt to retrieve the current tag
|
|
# Attempt to retrieve the current tag
|
|
|
git_tag=$(git describe --tags --exact-match 2>/dev/null || echo "")
|
|
git_tag=$(git describe --tags --exact-match 2>/dev/null || echo "")
|
|
@@ -29,11 +29,8 @@ else
|
|
|
# Retrieve the current SHA of the latest commit
|
|
# Retrieve the current SHA of the latest commit
|
|
|
git_commit_sha=$(git log -1 --format="%h" --abbrev=7)
|
|
git_commit_sha=$(git log -1 --format="%h" --abbrev=7)
|
|
|
|
|
|
|
|
- # Determine the branch or tag information, or fallback to SHA if in detached state
|
|
|
|
|
|
|
+ # Determine the branch or tag information
|
|
|
git_branch_or_tag="${git_branch:-${git_tag}}"
|
|
git_branch_or_tag="${git_branch:-${git_tag}}"
|
|
|
- if [ -z "${git_branch_or_tag}" ]; then
|
|
|
|
|
- git_branch_or_tag="detached"
|
|
|
|
|
- fi
|
|
|
|
|
|
|
|
|
|
# Update BuildDetails.plist with the branch or tag information
|
|
# Update BuildDetails.plist with the branch or tag information
|
|
|
plutil -replace com-trio-branch -string "${git_branch_or_tag}" "${info_plist_path}"
|
|
plutil -replace com-trio-branch -string "${git_branch_or_tag}" "${info_plist_path}"
|