From ed4fa2e8cb18444b454980ccf9682b6b90b3bb5f Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 25 Oct 2018 16:08:02 -0400 Subject: [PATCH] Respond to CR. --- Signal.xcodeproj/project.pbxproj | 2 +- Signal/Signal-Info.plist | 27 +++++++++++++++------------ Signal/src/AppDelegate.m | 15 ++++++++------- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 48efb5548..f2a896ce8 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -2933,7 +2933,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Capture hash & comment from last WebRTC git commit.\ncd $PROJECT_DIR/ThirdParty/WebRTC/\n_git_commit=`git log --pretty=oneline | head -1`\ncd $PROJECT_DIR\n# Remove existing .plist entry, if any.\n/usr/libexec/PlistBuddy -c \"Delete WebRTCCommit\" Signal/Signal-Info.plist || true\n# Add new .plist entry.\n/usr/libexec/PlistBuddy -c \"add WebRTCCommit string '$_git_commit'\" Signal/Signal-Info.plist\n\n/usr/libexec/PlistBuddy -c \"Delete BuildXCodeVersion\" Signal/Signal-Info.plist || true\n/usr/libexec/PlistBuddy -c \"add BuildXCodeVersion string '${XCODE_VERSION_MAJOR}.${XCODE_VERSION_MINOR}'\" Signal/Signal-Info.plist\n\n_osx_version=`defaults read loginwindow SystemVersionStampAsString`\n/usr/libexec/PlistBuddy -c \"Delete BuildOSXVersion\" Signal/Signal-Info.plist || true\n/usr/libexec/PlistBuddy -c \"add BuildOSXVersion string '$_osx_version'\" Signal/Signal-Info.plist\n\n_cocoapods_version=`pod --version`\n/usr/libexec/PlistBuddy -c \"Delete BuildCocoapodsVersion\" Signal/Signal-Info.plist || true\n/usr/libexec/PlistBuddy -c \"add BuildCocoapodsVersion string '$_cocoapods_version'\" Signal/Signal-Info.plist\n\n_carthage_version=`carthage version`\n/usr/libexec/PlistBuddy -c \"Delete BuildCarthageVersion\" Signal/Signal-Info.plist || true\n/usr/libexec/PlistBuddy -c \"add BuildCarthageVersion string '$_carthage_version'\" Signal/Signal-Info.plist\n\n"; + shellScript = "# Capture hash & comment from last WebRTC git commit.\ncd $PROJECT_DIR/ThirdParty/WebRTC/\n_git_commit=`git log --pretty=oneline | head -1`\ncd $PROJECT_DIR\n\n# Remove existing .plist entry, if any.\n/usr/libexec/PlistBuddy -c \"Delete BuildDetails\" Signal/Signal-Info.plist || true\n# Add new .plist entry.\n/usr/libexec/PlistBuddy -c \"add BuildDetails dict\" Signal/Signal-Info.plist\n\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:WebRTCCommit string '$_git_commit'\" Signal/Signal-Info.plist\n\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:XCodeVersion string '${XCODE_VERSION_MAJOR}.${XCODE_VERSION_MINOR}'\" Signal/Signal-Info.plist\n\n_osx_version=`defaults read loginwindow SystemVersionStampAsString`\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:OSXVersion string '$_osx_version'\" Signal/Signal-Info.plist\n\n_cocoapods_version=`pod --version`\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:CocoapodsVersion string '$_cocoapods_version'\" Signal/Signal-Info.plist\n\n_carthage_version=`carthage version`\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:CarthageVersion string '$_carthage_version'\" Signal/Signal-Info.plist\n\n# Use UTC\n_build_datetime=`date -u`\n/usr/libexec/PlistBuddy -c \"add :BuildDetails:DateTime string '$_build_datetime'\" Signal/Signal-Info.plist\n"; }; 451DE9EE1DC1546A00810E42 /* [Carthage] Copy Frameworks */ = { isa = PBXShellScriptBuildPhase; diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 2c24f5f0a..bcd4285b5 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -2,14 +2,21 @@ - BuildCarthageVersion - 0.31.0 - BuildCocoapodsVersion - 1.5.3 - BuildOSXVersion - 10.13.6 - BuildXCodeVersion - 0900.0940 + BuildDetails + + CarthageVersion + 0.31.0 + CocoapodsVersion + 1.5.3 + DateTime + Thu Oct 25 20:07:42 UTC 2018 + OSXVersion + 10.13.6 + WebRTCCommit + ca71024b4993ba95e3e6b8d0758004cffc54ddaf M70 + XCodeVersion + 0900.0940 + CFBundleDevelopmentRegion en CFBundleDisplayName @@ -143,9 +150,5 @@ UIViewControllerBasedStatusBarAppearance - WebRTCCommit - ca71024b4993ba95e3e6b8d0758004cffc54ddaf M70 - XCodeVersion - 0900.0940 diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index afdb2237b..53a1a184a 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -475,13 +475,14 @@ static NSTimeInterval launchStartedAt; UIDevice.currentDevice.model, [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]); - OWSLogInfo(@"WebRTC Commit: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"WebRTCCommit"]); - OWSLogInfo(@"Build XCode Version: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"BuildXCodeVersion"]); - OWSLogInfo(@"Build OS X Version: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"BuildOSXVersion"]); - OWSLogInfo( - @"Build Cocoapods Version: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"BuildCocoapodsVersion"]); - OWSLogInfo( - @"Build Carthage Version: %@", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"BuildCarthageVersion"]); + NSDictionary *buildDetails = + [[NSBundle mainBundle] objectForInfoDictionaryKey:@"BuildDetails"]; + OWSLogInfo(@"WebRTC Commit: %@", buildDetails[@"WebRTCCommit"]); + OWSLogInfo(@"Build XCode Version: %@", buildDetails[@"XCodeVersion"]); + OWSLogInfo(@"Build OS X Version: %@", buildDetails[@"OSXVersion"]); + OWSLogInfo(@"Build Cocoapods Version: %@", buildDetails[@"CocoapodsVersion"]); + OWSLogInfo(@"Build Carthage Version: %@", buildDetails[@"CarthageVersion"]); + OWSLogInfo(@"Build Date/Time: %@", buildDetails[@"DateTime"]); } - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken