Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Project: Discover both long and short build number from git

This uses the last git tag as version string and the 'git
describe' trick by Johannes for the buildnumber.
  • Loading branch information...
commit b7723a954551566e46c52a668ab8234802252dbf 1 parent 576337f
Pieter de Bie authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  GitX.xcodeproj/project.pbxproj
  2. +2 −2 Info.plist
View
2  GitX.xcodeproj/project.pbxproj
@@ -757,7 +757,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\n(echo -n \"#define BUILD_NUMBER \"; git describe|sed -e \"s/\\-/\\./\" -e \"s/v//\" -e \"s/-.*//\") > build/revision\ntouch Info.plist";
+ shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\nVERSION=$(git describe)\nLONG_VERSION=$(echo $VERSION | sed -e \"s/\\-/\\./\" -e \"s/^v//\" -e \"s/-.*//\")\nSHORT_VERSION=$(echo $VERSION | sed -e \"s/\\-.*//\" -e \"s/^v//\")\n\necho -n \"#define LONG_VERSION $LONG_VERSION\n#define SHORT_VERSION $SHORT_VERSION\" > build/revision\ntouch Info.plist";
};
F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
isa = PBXShellScriptBuildPhase;
View
4 Info.plist
@@ -49,9 +49,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>BUILD_NUMBER</string>
+ <string>LONG_VERSION</string>
<key>CFBundleShortVersionString</key>
- <string>0.6.1</string>
+ <string>SHORT_VERSION</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Please sign in to comment.
Something went wrong with that request. Please try again.