Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display revision in the About Dialog

We do this by preprocessing the Info.plist file
and adding a prefix header with the current revision
#define'd. This seems to be the most reliable way,
unfortunately
  • Loading branch information...
commit f3c131ecdef4cf2be61eb3d0ff40cd47cac14b90 1 parent af40162
Pieter de Bie authored
Showing with 83 additions and 5 deletions.
  1. +1 −0  .gitignore
  2. +81 −4 GitX.xcodeproj/project.pbxproj
  3. +1 −1  Info.plist
View
1  .gitignore
@@ -1,4 +1,5 @@
build
+build/revision
*.xcodeproj/*.pbxuser
*.xcodeproj/*.perspectivev3
*.xcodeproj/*.mode1v3
View
85 GitX.xcodeproj/project.pbxproj
@@ -6,6 +6,20 @@
objectVersion = 45;
objects = {
+/* Begin PBXAggregateTarget section */
+ F56439F70F792B2100A579C2 /* Generate PList Prefix */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */;
+ buildPhases = (
+ F56439F60F792B2100A579C2 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "Generate PList Prefix";
+ productName = "Generate PList Prefix";
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
056438B70ED0C40B00985397 /* DetailViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 056438B60ED0C40B00985397 /* DetailViewTemplate.png */; };
3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; };
@@ -113,6 +127,13 @@
remoteGlobalIDString = 913D5E480E55644600CECEA2;
remoteInfo = "cli tool";
};
+ F5643A010F792B4900A579C2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = F56439F70F792B2100A579C2;
+ remoteInfo = "Generate PList Prefix";
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -614,7 +635,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget "GitX" */;
buildPhases = (
- F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */,
+ F5792DFB0EDB570C001B0C31 /* Compile libgit2 */,
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
@@ -625,6 +646,7 @@
);
dependencies = (
913D5E5A0E5564F400CECEA2 /* PBXTargetDependency */,
+ F5643A020F792B4900A579C2 /* PBXTargetDependency */,
);
name = GitX;
productInstallPath = "$(HOME)/Applications";
@@ -680,6 +702,7 @@
8D1107260486CEB800E47090 /* GitX */,
913D5E480E55644600CECEA2 /* cli tool */,
F5886A0F0ED5D33D0066E74C /* SpeedTest */,
+ F56439F70F792B2100A579C2 /* Generate PList Prefix */,
);
};
/* End PBXProject section */
@@ -723,19 +746,32 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */ = {
+ F56439F60F792B2100A579C2 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "Compilie libgit2";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "git submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\"-arch i386 -arch ppc\"\nranlib libgit2.a";
+ 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) > build/revision\ntouch Info.plist";
+ };
+ F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Compile libgit2";
+ outputPaths = (
+ );
+ 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`\ngit submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\"-arch i386 -arch ppc\"\nranlib libgit2.a";
};
F5CF04A20EAE696C00D75C81 /* Copy HTML files */ = {
isa = PBXShellScriptBuildPhase;
@@ -850,6 +886,11 @@
target = 913D5E480E55644600CECEA2 /* cli tool */;
targetProxy = 913D5E590E5564F400CECEA2 /* PBXContainerItemProxy */;
};
+ F5643A020F792B4900A579C2 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = F56439F70F792B2100A579C2 /* Generate PList Prefix */;
+ targetProxy = F5643A010F792B4900A579C2 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@@ -905,6 +946,9 @@
GCC_PREFIX_HEADER = GitX_Prefix.pch;
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = Info.plist;
+ INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
+ INFOPLIST_PREFIX_HEADER = build/revision;
+ INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
PRODUCT_NAME = GitX;
@@ -927,6 +971,9 @@
GCC_PREFIX_HEADER = GitX_Prefix.pch;
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = Info.plist;
+ INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
+ INFOPLIST_PREFIX_HEADER = build/revision;
+ INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
PRODUCT_NAME = GitX;
@@ -1007,6 +1054,27 @@
};
name = Release;
};
+ F56439F80F792B2100A579C2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = "Generate PList Prefix";
+ };
+ name = Debug;
+ };
+ F56439F90F792B2100A579C2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = "Generate PList Prefix";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
F5886A130ED5D33E0066E74C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1092,6 +1160,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F56439F80F792B2100A579C2 /* Debug */,
+ F56439F90F792B2100A579C2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
F5886A150ED5D33E0066E74C /* Build configuration list for PBXNativeTarget "SpeedTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
View
2  Info.plist
@@ -49,7 +49,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>0.6.1</string>
+ <string>BUILD_NUMBER</string>
<key>CFBundleShortVersionString</key>
<string>0.6.1</string>
<key>NSMainNibFile</key>
Please sign in to comment.
Something went wrong with that request. Please try again.