mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Send the CFBundleGitVersion string along with the other sparkle profile info
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
- (void)applicationDidFinishLaunching:(NSNotification*)notification
|
||||
{
|
||||
[[SUUpdater sharedUpdater] setSendsSystemProfile:YES];
|
||||
[[SUUpdater sharedUpdater] setDelegate:self];
|
||||
|
||||
// Make sure Git's SSH password requests get forwarded to our little UI tool:
|
||||
setenv( "SSH_ASKPASS", [[[NSBundle mainBundle] pathForResource: @"gitx_askpasswd" ofType: @""] UTF8String], 1 );
|
||||
@@ -380,4 +381,29 @@
|
||||
[managedObjectModel release], managedObjectModel = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark Sparkle delegate methods
|
||||
|
||||
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile
|
||||
{
|
||||
NSArray *keys = [NSArray arrayWithObjects:@"key", @"displayKey", @"value", @"displayValue", nil];
|
||||
NSMutableArray *feedParameters = [NSMutableArray array];
|
||||
|
||||
// only add parameters if the profile is being sent this time
|
||||
if (sendingProfile) {
|
||||
NSString *CFBundleGitVersion = [[[NSBundle mainBundle] infoDictionary] valueForKey:@"CFBundleGitVersion"];
|
||||
if (CFBundleGitVersion)
|
||||
[feedParameters addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"CFBundleGitVersion", @"Full Version", CFBundleGitVersion, CFBundleGitVersion, nil]
|
||||
forKeys:keys]];
|
||||
|
||||
NSString *gitVersion = [PBGitBinary version];
|
||||
if (gitVersion)
|
||||
[feedParameters addObject:[NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"gitVersion", @"git Version", gitVersion, gitVersion, nil]
|
||||
forKeys:keys]];
|
||||
}
|
||||
|
||||
return feedParameters;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user