So first a thanks to harald for his answer and comments, which helped me to better think through what I really wanted to accomplish.
Let me sum up what my thought was, what I realized I wanted to do, and how I did it.
I wanted a way to populate the build number (CFBundleVersion) in an automated way. This value is stored in the main project -Info.plist file, which is source controlled. I was concerned about following guides to automate this via "Build Phase" scripts in that it would modify this file for possibly multiple developers and cause a situation where constant merging would be needed.
The reason I wanted this is so that I could easily track down what code was in play for a particular build. While one certainly can manually do this with tagging and proper documentation, I wanted a more automated and flexible way since I think I will be done a lot of builds out to TestFlight.
My original line of thought was to use a simple incremental build number for this value, but that would really be trouble with the merging. Harald's suggestion of using the commit SHA on the Git repo sparked a better line of thinking for me.
So the first part of my solution is to use the first 9 characters from the commit SHA (the SHA would be too long). I use the first 9 characters since I am running GitLab HQ (a great open source project, by the way) and they use the first 9 in their display of the running stream of commits. The command to get me this is as follows:
/usr/bin/git rev-parse --short=9 HEAD
In order to avoid having the Git merge issue, I thought of first changing the build number (CFBundleVersion) value in the projects -Info.plist file, allowing the build to run, and then at the last step change the value back to a default 1 so that it would not appear changed in source control. I tried every which way to do this in the "Build Phases" flow using a "Run Script", but it seems that even when putting the code in to revert the value in the final step, it was affecting the running app.
After digging a bit more I came across the schemas and the pre-actions and post-actions. This seemed to be my route.
Thus, in the schema, for the "build" plan, I created a pre-action that would set the CFBundleVersion value to my current commit Id (9 characters), and in the post-action I would revert this value back to the default (1). This seems to work as I need it to.
Here is my pre-action code:
buildPlist="$SRCROOT/$INFOPLIST_FILE"
echo "The build plist file $buildPlist"
CFBundleVersion="$(cd $SRCROOT;/usr/bin/git rev-parse --short=9 HEAD)"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" $buildPlist
Here is my post-action code:
buildPlist=$"$SRCROOT/$INFOPLIST_FILE"
CFBundleVersion=1
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" $buildPlist
Something to note with this code that differs from what I was using in the "Build Phase" scripts is the requirement to use the $SRCROOT to set the directory. Initially I was under the impression that you would get the same build settings as you do in the "Build Phase", it appears you do not. There is an option in the "Run Script" window named "Provide build settings from :" and it lets you select a target. Maybe that is working correct and regardless given the pre-action you must set your full directory path. It took me a little bit to figure that out so I thought I would mentioned it.
In summary, I appreciate the information I received and it helped me think through what I was looking to do and ultimately get to the goal I wanted.