Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 2 changed files with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 1  GitX.xcodeproj/project.pbxproj
  2. +2 2 Info.plist
2  GitX.xcodeproj/project.pbxproj
@@ -757,7 +757,7 @@
757 757 );
758 758 runOnlyForDeploymentPostprocessing = 0;
759 759 shellPath = /bin/sh;
760   - 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";
  760 + 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";
761 761 };
762 762 F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
763 763 isa = PBXShellScriptBuildPhase;
4 Info.plist
@@ -49,9 +49,9 @@
49 49 <key>CFBundleSignature</key>
50 50 <string>????</string>
51 51 <key>CFBundleVersion</key>
52   - <string>BUILD_NUMBER</string>
  52 + <string>LONG_VERSION</string>
53 53 <key>CFBundleShortVersionString</key>
54   - <string>0.6.1</string>
  54 + <string>SHORT_VERSION</string>
55 55 <key>NSMainNibFile</key>
56 56 <string>MainMenu</string>
57 57 <key>NSPrincipalClass</key>

0 comments on commit b7723a9

Please sign in to comment.
Something went wrong with that request. Please try again.