Skip to content

Commit

Permalink
[MAIN] Fix CFBundleShortVersionString
Browse files Browse the repository at this point in the history
  • Loading branch information
pertau committed Sep 27, 2023
1 parent 13714af commit d35c312
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Support/Scripts/set_version_information.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
git=$(sh /etc/profile; which git)
number_of_commits=$("$git" rev-list HEAD --count)
git_release_version=$("$git" describe --tags --always --abbrev=0)
clear_release_version=${git_release_version//[!0-9]/}

target_plist="$TARGET_BUILD_DIR/$INFOPLIST_PATH"
dsym_plist="$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist"

for plist in "$target_plist" "$dsym_plist"; do
if [ -f "$plist" ]; then
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $number_of_commits" "$plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${git_release_version#*v}" "$plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${clear_release_version#*v}" "$plist"
fi
done

0 comments on commit d35c312

Please sign in to comment.