To set the version number to the current date, open the BasiliskII project in Xcode. In the left had column of the central pane, under TARGETS, select BasiliskII.
In the central pane, select Build Phases, and expand the item that says Run Script.
You will see a script already present, with one line that begins "cc". Beneath that line, insert the following:
Code: Select all
buildNumber=$(date -u "+%Y-%m-%d")
fullNumber="2.5 "$(date -u "+%Y-%m-%d")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $fullNumber" "${BUILT_PRODUCTS_DIR}/BasiliskII.app/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $buildNumber" "${BUILT_PRODUCTS_DIR}/BasiliskII.app/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleGetInfoString $buildNumber" "${BUILT_PRODUCTS_DIR}/BasiliskII.app/Contents/Info.plist"
Below the window with the script, remove the check mark (if any) in the two boxes next to Run Script.
It should look something like this:

Now build BasiliskII and look at the version numbers in the Get Info panel. It should look something like this:

I had been doing this by hand in my build, but this is obviously a lot easier.