mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Don't touch Info.plist unless git version changes
PlistBuddy always touches its output file, even if the value written is identical to the value already there. In such case, Xcode sees Info.plist as modified, therefore sees the entire target as modified and re-runs potentially expensive operations like copying frameworks or signing. Avoid unnecessary build operations by checking the previous CFBundleShortVersionString if Info.plist already exists and only updating it if necessary.
This commit is contained in:
1 parent
6e51231966
commit
1f98f9eb36
1 file changed
+8
-2
@@ -30,5 +30,11 @@ fi
|
||||
|
||||
# and use it to set the CFBundleShortVersionString value
|
||||
export PATH="$PATH:/usr/libexec"
|
||||
PlistBuddy -c "Set :CFBundleShortVersionString '$version'" \
|
||||
"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
|
||||
|
||||
if [ -f "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" ] ; then
|
||||
oldversion=$(PlistBuddy -c "Print :CFBundleShortVersionString" "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH")
|
||||
fi
|
||||
if [ "$version" != "$oldversion" ] ; then
|
||||
PlistBuddy -c "Set :CFBundleShortVersionString '$version'" \
|
||||
"$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
|
||||
fi
|
||||
Reference in new issue
Block a user