Skip to content

Instantly share code, notes, and snippets.

@rsky
Created June 16, 2015 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsky/576ecf78526d7295f33a to your computer and use it in GitHub Desktop.
Save rsky/576ecf78526d7295f33a to your computer and use it in GitHub Desktop.
CFBundleVersionにビルドのタイムスタンプを追加する
#!/bin/bash
plistBuddy="/usr/libexec/PlistBuddy"
infoPlistFileSource="${SRCROOT}/${INFOPLIST_FILE}"
infoPlistFileDestination="${TEMP_DIR}/Preprocessed-Info.plist"
currentVersion=$($plistBuddy -c "Print CFBundleVersion" $infoPlistFileSource)
timeStamp=$(date '+%s')
versionString="$currentVersion.$timeStamp"
$plistBuddy -c "Set :CFBundleVersion $versionString" $infoPlistFileDestination
@rsky
Copy link
Author

rsky commented Jun 16, 2015

INFOPLIST_PREPROCESS = YES;の場合

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment