Guest User

Untitled

a guest
Jan 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist"
  4. INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist"
  5. INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist"
  6.  
  7. PLISTCMD="Set :CFBundleVersion $(git rev-list --all|wc -l)"
  8.  
  9. echo -n "$INFOPLIST"
  10. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  11.  
  12. echo -n "$INFOPLIST_WKAPP"
  13. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  14.  
  15. echo -n "$INFOPLIST_WKEXT"
  16. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  17.  
  18. #!/bin/sh
  19.  
  20. INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist"
  21. INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist"
  22. INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist"
  23.  
  24. PLISTCMD="Set :CFBundleVersion SCRIPTED"
  25.  
  26. echo -n "$INFOPLIST"
  27. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  28.  
  29. echo -n "$INFOPLIST_WKAPP"
  30. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  31.  
  32. echo -n "$INFOPLIST_WKEXT"
  33. | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
  34.  
  35. INFOPLIST_MYAPP="${SRCROOT}/MyApp/MyApp-Info.plist"
  36. myAppVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_MYAPP")
  37. myAppBuild=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_MYAPP")
  38.  
  39. INFOPLIST_SHAREEXT="${SRCROOT}/ShareExtension/Info.plist"
  40. /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $myAppVersion" "$INFOPLIST_SHAREEXT"
  41. /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $myAppBuild" "$INFOPLIST_SHAREEXT"
Add Comment
Please, Sign In to add comment