Skip to content

Commit

Permalink
Fix build details for non-git builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2 committed Sep 15, 2019
1 parent d7391b8 commit d6105aa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Scripts/capture-build-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
echo "Gathering build details in ${SRCROOT}"
cd ${SRCROOT}

rev=$(git rev-parse HEAD)
branch=$(git branch | grep \* | cut -d ' ' -f2-)
plist="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"

plutil -replace com-loopkit-Loop-git-revision -string ${rev} "${plist}"
plutil -replace com-loopkit-Loop-git-branch -string "${branch}" "${plist}"
if [ -e .git ]; then
rev=$(git rev-parse HEAD)
plutil -replace com-loopkit-Loop-git-revision -string ${rev} "${plist}"
branch=$(git branch | grep \* | cut -d ' ' -f2-)
plutil -replace com-loopkit-Loop-git-branch -string "${branch}" "${plist}"
fi;
plutil -replace com-loopkit-Loop-srcroot -string ${SRCROOT} "${plist}"
plutil -replace com-loopkit-Loop-build-date -string "$(date)" "${plist}"
plutil -replace com-loopkit-Loop-xcode-version -string "${XCODE_PRODUCT_BUILD_VERSION}" "${plist}"

0 comments on commit d6105aa

Please sign in to comment.