Skip to content

Commit cf39a01

Browse files
authored
Merge pull request #41 from deszip/feature/build-actions
Feature/build actions
2 parents d93d0bb + 216dddf commit cf39a01

File tree

604 files changed

+43526
-1889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

604 files changed

+43526
-1889
lines changed

BitBotATVTests/BitBot.xctestplan

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
},
1818
"testTargets" : [
1919
{
20-
"parallelizable" : true,
2120
"target" : {
2221
"containerPath" : "container:Bitrise.xcodeproj",
2322
"identifier" : "0E42CAEA20EC7A800033CD03",

BitBotATVTests/BitBotATVTests.swift

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,4 @@ import XCTest
1010

1111
class BitBotATVTests: XCTestCase {
1212

13-
override func setUpWithError() throws {
14-
// Put setup code here. This method is called before the invocation of each test method in the class.
15-
}
16-
17-
override func tearDownWithError() throws {
18-
// Put teardown code here. This method is called after the invocation of each test method in the class.
19-
}
20-
21-
func testExample() throws {
22-
// This is an example of a functional test case.
23-
// Use XCTAssert and related functions to verify your tests produce the correct results.
24-
}
25-
26-
func testPerformanceExample() throws {
27-
// This is an example of a performance test case.
28-
measure {
29-
// Put the code you want to measure the time of here.
30-
}
31-
}
32-
3313
}

Bitrise.xcodeproj/project.pbxproj

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
0ED38CDC220DE9000006FE69 /* ASLogLoadingOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ED38CDB220DE9000006FE69 /* ASLogLoadingOperation.m */; };
103103
0ED38CDD220DE9000006FE69 /* ASLogLoadingOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0ED38CDB220DE9000006FE69 /* ASLogLoadingOperation.m */; };
104104
0EDC5DE321BBBB0A00AD41FE /* ASQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DDF21BBBB0A00AD41FE /* ASQueue.m */; };
105-
0EDC5DE421BBBB0A00AD41FE /* ASOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DE221BBBB0A00AD41FE /* ASOperation.m */; };
105+
0EDC5DE421BBBB0A00AD41FE /* BROperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DE221BBBB0A00AD41FE /* BROperation.m */; };
106106
0EDC5DE721BBFB0A00AD41FE /* BRSyncOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DE621BBFB0A00AD41FE /* BRSyncOperation.m */; };
107107
0EDE7D0821B9346200A39CC4 /* BRSyncEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDE7D0721B9346200A39CC4 /* BRSyncEngine.m */; };
108108
0EDE7D0921B9346200A39CC4 /* BRSyncEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDE7D0721B9346200A39CC4 /* BRSyncEngine.m */; };
@@ -119,7 +119,7 @@
119119
0EFD891520F1FDE10023FCCE /* BRBuild+Mapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFD891420F1FDE10023FCCE /* BRBuild+Mapping.m */; };
120120
0EFD891820F201400023FCCE /* BRAppInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFD891720F201400023FCCE /* BRAppInfo.m */; };
121121
0EFD893D20F4893B0023FCCE /* BRApp+Mapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EFD893C20F4893B0023FCCE /* BRApp+Mapping.m */; };
122-
8605E0C237B585EB9BC0356C /* libPods-BitriseATV.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E2C5865B43E250E9D3620EC /* libPods-BitriseATV.a */; };
122+
B6085FB37966F37D39919AAA /* libPods-BitBotATV.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C47D1452DDE09A85608B0F /* libPods-BitBotATV.a */; };
123123
D90BFBA025372FF800DA473E /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D90BFB9F25372FF800DA473E /* CloudKit.framework */; };
124124
D90BFBA62537388000DA473E /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D90BFBA52537388000DA473E /* CloudKit.framework */; };
125125
D91BD9C625A1BE7000EF8D66 /* BitBotATVTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D91BD9C525A1BE7000EF8D66 /* BitBotATVTests.swift */; };
@@ -177,7 +177,7 @@
177177
DE3CD07D25246A0400DD5948 /* BRBuildsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EB3ED7221E7BC92003F0364 /* BRBuildsRequest.m */; };
178178
DE3CD08125246A0A00DD5948 /* BRAppsRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EB3ED7521E88E8C003F0364 /* BRAppsRequest.m */; };
179179
DE3CD08525246A1100DD5948 /* BRCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E3C0B122117627700F2EA35 /* BRCommand.m */; };
180-
DE3CD08925246A2E00DD5948 /* ASOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DE221BBBB0A00AD41FE /* ASOperation.m */; };
180+
DE3CD08925246A2E00DD5948 /* BROperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EDC5DE221BBBB0A00AD41FE /* BROperation.m */; };
181181
DE3CD08F25246A7500DD5948 /* AccountCommandsDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE3CD08E25246A7500DD5948 /* AccountCommandsDispatcher.swift */; };
182182
DE3CD09625246F5400DD5948 /* BRStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E93B6F620F0837B001A6C15 /* BRStorage.m */; };
183183
DE3CD09A25246F5A00DD5948 /* BRBitriseAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E8E9B5420F0819E00494DEB /* BRBitriseAPI.m */; };
@@ -462,9 +462,9 @@
462462
0ED38CDA220DE9000006FE69 /* ASLogLoadingOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ASLogLoadingOperation.h; sourceTree = "<group>"; };
463463
0ED38CDB220DE9000006FE69 /* ASLogLoadingOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ASLogLoadingOperation.m; sourceTree = "<group>"; };
464464
0EDC5DDF21BBBB0A00AD41FE /* ASQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASQueue.m; sourceTree = "<group>"; };
465-
0EDC5DE021BBBB0A00AD41FE /* ASOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASOperation.h; sourceTree = "<group>"; };
465+
0EDC5DE021BBBB0A00AD41FE /* BROperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BROperation.h; sourceTree = "<group>"; };
466466
0EDC5DE121BBBB0A00AD41FE /* ASQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASQueue.h; sourceTree = "<group>"; };
467-
0EDC5DE221BBBB0A00AD41FE /* ASOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASOperation.m; sourceTree = "<group>"; };
467+
0EDC5DE221BBBB0A00AD41FE /* BROperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BROperation.m; sourceTree = "<group>"; };
468468
0EDC5DE521BBFB0A00AD41FE /* BRSyncOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BRSyncOperation.h; sourceTree = "<group>"; };
469469
0EDC5DE621BBFB0A00AD41FE /* BRSyncOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BRSyncOperation.m; sourceTree = "<group>"; };
470470
0EDE7D0621B9346200A39CC4 /* BRSyncEngine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BRSyncEngine.h; sourceTree = "<group>"; };
@@ -496,9 +496,11 @@
496496
4592E252F47089546A803FDB /* libPods-BitBot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BitBot.a"; sourceTree = BUILT_PRODUCTS_DIR; };
497497
6206DED9400023C6320DD7AB /* libPods-BitBotTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BitBotTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
498498
64F51DE74237213D947FD5AF /* Pods-BitBotTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BitBotTests.release.xcconfig"; path = "Target Support Files/Pods-BitBotTests/Pods-BitBotTests.release.xcconfig"; sourceTree = "<group>"; };
499-
7E2C5865B43E250E9D3620EC /* libPods-BitriseATV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BitriseATV.a"; sourceTree = BUILT_PRODUCTS_DIR; };
500499
8737EB33A867885C0D9BD854 /* Pods-BitriseATV.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BitriseATV.release.xcconfig"; path = "Target Support Files/Pods-BitriseATV/Pods-BitriseATV.release.xcconfig"; sourceTree = "<group>"; };
501500
A0D4B65651B1B5745349F720 /* Pods-BitriseATV.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BitriseATV.debug.xcconfig"; path = "Target Support Files/Pods-BitriseATV/Pods-BitriseATV.debug.xcconfig"; sourceTree = "<group>"; };
501+
A1C47D1452DDE09A85608B0F /* libPods-BitBotATV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BitBotATV.a"; sourceTree = BUILT_PRODUCTS_DIR; };
502+
C032C508CB7EA3215E3C4EEA /* Pods-BitBotATV.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BitBotATV.debug.xcconfig"; path = "Target Support Files/Pods-BitBotATV/Pods-BitBotATV.debug.xcconfig"; sourceTree = "<group>"; };
503+
D84A7482A583FF266B3A58C9 /* Pods-BitBotATV.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BitBotATV.release.xcconfig"; path = "Target Support Files/Pods-BitBotATV/Pods-BitBotATV.release.xcconfig"; sourceTree = "<group>"; };
502504
D90BFB9F25372FF800DA473E /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
503505
D90BFBA42537387D00DA473E /* BitBotATVRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = BitBotATVRelease.entitlements; sourceTree = "<group>"; };
504506
D90BFBA52537388000DA473E /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CloudKit.framework; sourceTree = DEVELOPER_DIR; };
@@ -652,8 +654,8 @@
652654
isa = PBXFrameworksBuildPhase;
653655
buildActionMask = 2147483647;
654656
files = (
655-
8605E0C237B585EB9BC0356C /* libPods-BitriseATV.a in Frameworks */,
656657
D90BFBA62537388000DA473E /* CloudKit.framework in Frameworks */,
658+
B6085FB37966F37D39919AAA /* libPods-BitBotATV.a in Frameworks */,
657659
);
658660
runOnlyForDeploymentPostprocessing = 0;
659661
};
@@ -667,7 +669,7 @@
667669
D90BFB9F25372FF800DA473E /* CloudKit.framework */,
668670
4592E252F47089546A803FDB /* libPods-BitBot.a */,
669671
6206DED9400023C6320DD7AB /* libPods-BitBotTests.a */,
670-
7E2C5865B43E250E9D3620EC /* libPods-BitriseATV.a */,
672+
A1C47D1452DDE09A85608B0F /* libPods-BitBotATV.a */,
671673
);
672674
name = Frameworks;
673675
sourceTree = "<group>";
@@ -1078,8 +1080,8 @@
10781080
children = (
10791081
0EDC5DE121BBBB0A00AD41FE /* ASQueue.h */,
10801082
0EDC5DDF21BBBB0A00AD41FE /* ASQueue.m */,
1081-
0EDC5DE021BBBB0A00AD41FE /* ASOperation.h */,
1082-
0EDC5DE221BBBB0A00AD41FE /* ASOperation.m */,
1083+
0EDC5DE021BBBB0A00AD41FE /* BROperation.h */,
1084+
0EDC5DE221BBBB0A00AD41FE /* BROperation.m */,
10831085
);
10841086
path = Queue;
10851087
sourceTree = "<group>";
@@ -1145,6 +1147,8 @@
11451147
64F51DE74237213D947FD5AF /* Pods-BitBotTests.release.xcconfig */,
11461148
A0D4B65651B1B5745349F720 /* Pods-BitriseATV.debug.xcconfig */,
11471149
8737EB33A867885C0D9BD854 /* Pods-BitriseATV.release.xcconfig */,
1150+
C032C508CB7EA3215E3C4EEA /* Pods-BitBotATV.debug.xcconfig */,
1151+
D84A7482A583FF266B3A58C9 /* Pods-BitBotATV.release.xcconfig */,
11481152
);
11491153
path = Pods;
11501154
sourceTree = "<group>";
@@ -1759,7 +1763,7 @@
17591763
outputFileListPaths = (
17601764
);
17611765
outputPaths = (
1762-
"$(DERIVED_FILE_DIR)/Pods-BitriseATV-checkManifestLockResult.txt",
1766+
"$(DERIVED_FILE_DIR)/Pods-BitBotATV-checkManifestLockResult.txt",
17631767
);
17641768
runOnlyForDeploymentPostprocessing = 0;
17651769
shellPath = /bin/sh;
@@ -1843,7 +1847,7 @@
18431847
0E8E9B5520F0819E00494DEB /* BRBitriseAPI.m in Sources */,
18441848
0EC53F45221B19F900F47B47 /* BRLogsTextViewController.m in Sources */,
18451849
0EB3ED7021E7B7F4003F0364 /* BRAbortRequest.m in Sources */,
1846-
0EDC5DE421BBBB0A00AD41FE /* ASOperation.m in Sources */,
1850+
0EDC5DE421BBBB0A00AD41FE /* BROperation.m in Sources */,
18471851
0E93B70D20F0F9BB001A6C15 /* BTRAccount+Mapping.m in Sources */,
18481852
0EFD893D20F4893B0023FCCE /* BRApp+Mapping.m in Sources */,
18491853
0E3C0B022117008200F2EA35 /* BRBuildStateInfo.m in Sources */,
@@ -2011,7 +2015,7 @@
20112015
DE48664725245A6100D5D80F /* BRAccountRequest.m in Sources */,
20122016
DE2A26B4252313DB00D5762E /* bitrise.xcdatamodeld in Sources */,
20132017
DEBE8C1C2513B7FB00CF079A /* BitriseATVApp.swift in Sources */,
2014-
DE3CD08925246A2E00DD5948 /* ASOperation.m in Sources */,
2018+
DE3CD08925246A2E00DD5948 /* BROperation.m in Sources */,
20152019
DED411102534A27900A711BC /* SettingsProvider.swift in Sources */,
20162020
DEF04DA0252C9335008C4C97 /* BRAbortRequest.m in Sources */,
20172021
DE4866162523633E00D5D80F /* AccountsConnector.swift in Sources */,
@@ -2335,7 +2339,7 @@
23352339
};
23362340
DEBE8C252513B7FD00CF079A /* Debug */ = {
23372341
isa = XCBuildConfiguration;
2338-
baseConfigurationReference = A0D4B65651B1B5745349F720 /* Pods-BitriseATV.debug.xcconfig */;
2342+
baseConfigurationReference = C032C508CB7EA3215E3C4EEA /* Pods-BitBotATV.debug.xcconfig */;
23392343
buildSettings = {
23402344
ASSETCATALOG_COMPILER_APPICON_NAME = "Brand Assets";
23412345
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -2367,7 +2371,7 @@
23672371
};
23682372
DEBE8C262513B7FD00CF079A /* Release */ = {
23692373
isa = XCBuildConfiguration;
2370-
baseConfigurationReference = 8737EB33A867885C0D9BD854 /* Pods-BitriseATV.release.xcconfig */;
2374+
baseConfigurationReference = D84A7482A583FF266B3A58C9 /* Pods-BitBotATV.release.xcconfig */;
23712375
buildSettings = {
23722376
ASSETCATALOG_COMPILER_APPICON_NAME = "Brand Assets";
23732377
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;

Bitrise/Environment/BRAnalytics.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ NS_ASSUME_NONNULL_BEGIN
1616

1717
+ (instancetype)analytics;
1818

19+
// Controls if services are running
1920
- (void)start;
20-
- (void)toggle;
21+
- (void)stop;
22+
23+
// Controls if analytics is allowed by user
2124
- (void)setEnabled:(BOOL)isEnabled;
2225
- (BOOL)isEnabled;
2326

27+
// Switches enabled state and calls start/stop
28+
- (void)toggle;
29+
2430
#pragma mark - Events -
2531

2632
- (void)trackQuitApp;
@@ -31,11 +37,13 @@ NS_ASSUME_NONNULL_BEGIN
3137
- (void)trackAnalyticsToggle;
3238

3339
- (void)trackAccountAdd;
34-
- (void)trackAccountAddFailure;
40+
- (void)trackAccountAddFailure:(NSError *)error;
3541
- (void)trackAccountRemove;
42+
- (void)trackAccountRemoveError:(NSError *)error;
3643
- (void)trackSyncWithStarted:(NSUInteger)started
3744
running:(NSUInteger)running
3845
finished:(NSUInteger)finished;
46+
- (void)trackSyncError:(NSError *)error;
3947
- (void)trackRebuildAction;
4048
- (void)trackAbortAction;
4149
- (void)trackLoadLogsAction;

Bitrise/Environment/BRAnalytics.m

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@
99
#import "BRAnalytics.h"
1010

1111
#import <Mixpanel/Mixpanel.h>
12+
#import <Sentry/Sentry.h>
1213

1314
static NSString * const kBRAnalyticsAvailabilityKey = @"kBRAnalyticsAvailabilityKey";
1415

1516
static NSString * const kBRMixpanelOSXToken = @"ae64ff4c78b73e7f945f63aa02677fbb";
1617
static NSString * const kBRMixpanelATVToken = @"4d209b738bd7dc6965ad1325080f83f1";
1718

19+
#if DEBUG
20+
static NSString * const kBRSentryOSXDSNPath = @"https://16702f55ff1346e49d6ae3aa41bffc8b@o577211.ingest.sentry.io/5731739";
21+
#else
22+
static NSString * const kBRSentryOSXDSNPath = @"https://c955ed8ebdfc4db6bc206bfec0db2af2@o577211.ingest.sentry.io/5783183";
23+
#endif
24+
25+
static NSString * const kBRSentryATVDSNPath = @"https://eb1b1d1669e344d2a0799c79ec1c78ce@o577211.ingest.sentry.io/5737938";
26+
1827
typedef NSString BRAnalyticsEvent;
1928

2029
static BRAnalyticsEvent * const kQuitAppEvent = @"app_quit";
@@ -63,22 +72,42 @@ + (instancetype)analytics {
6372
}
6473

6574
- (void)start {
75+
// First launch, enable by default
76+
if ([[NSUserDefaults standardUserDefaults] objectForKey:kBRAnalyticsAvailabilityKey] == nil) {
77+
[[BRAnalytics analytics] setEnabled:YES];
78+
}
79+
80+
// Start services if enabled
81+
if ([self isEnabled]) {
6682
#if TARGET_OS_OSX
67-
[Mixpanel sharedInstanceWithToken:kBRMixpanelOSXToken];
83+
[self startMixpanel:kBRMixpanelOSXToken];
84+
[self startSentry:kBRSentryOSXDSNPath];
6885
#else
69-
[Mixpanel sharedInstanceWithToken:kBRMixpanelATVToken];
86+
[self startMixpanel:kBRMixpanelATVToken];
87+
[self startSentry:kBRSentryATVDSNPath];
7088
#endif
71-
72-
if ([[NSUserDefaults standardUserDefaults] objectForKey:kBRAnalyticsAvailabilityKey] == nil) {
73-
[[BRAnalytics analytics] setEnabled:YES];
7489
}
7590
}
7691

92+
- (void)stop {
93+
[self stopMixpanel];
94+
[self stopSentry];
95+
}
96+
7797
- (void)toggle {
7898
[self setEnabled:![self isEnabled]];
99+
if ([self isEnabled]) {
100+
[self start];
101+
} else {
102+
[self stop];
103+
}
79104
}
80105

81106
- (void)setEnabled:(BOOL)isEnabled {
107+
if (isEnabled == [self isEnabled]) {
108+
return;
109+
}
110+
82111
[self.defaults setBool:isEnabled forKey:kBRAnalyticsAvailabilityKey];
83112
[self.defaults synchronize];
84113
}
@@ -87,6 +116,32 @@ - (BOOL)isEnabled {
87116
return [self.defaults boolForKey:kBRAnalyticsAvailabilityKey];
88117
}
89118

119+
#pragma mark - Providers -
120+
121+
- (void)startMixpanel:(NSString *)token {
122+
[Mixpanel sharedInstanceWithToken:token];
123+
if ([[Mixpanel sharedInstance] hasOptedOutTracking]) {
124+
[[Mixpanel sharedInstance] optInTracking];
125+
}
126+
}
127+
128+
- (void)stopMixpanel {
129+
[[Mixpanel sharedInstance] flush];
130+
[[Mixpanel sharedInstance] reset];
131+
[[Mixpanel sharedInstance] optOutTracking];
132+
}
133+
134+
- (void)startSentry:(NSString *)dsn {
135+
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
136+
options.dsn = dsn;
137+
options.tracesSampleRate = @1.0;
138+
}];
139+
}
140+
141+
- (void)stopSentry {
142+
[SentrySDK close];
143+
}
144+
90145
#pragma mark - Events -
91146

92147
- (void)trackQuitApp { [self sendEvent:kQuitAppEvent properties:@{}]; }
@@ -97,13 +152,23 @@ - (void)trackNotificationsToggle { [self sendEvent:kNotificationsToggleEvent pro
97152
- (void)trackAnalyticsToggle { [self sendEvent:kAnalyticsToggleEvent properties:@{}]; }
98153

99154
- (void)trackAccountAdd { [self sendEvent:kAddAccountEvent properties:@{}]; }
100-
- (void)trackAccountAddFailure { [self sendEvent:kAddAccountFailureEvent properties:@{}]; }
155+
- (void)trackAccountAddFailure:(NSError *)error {
156+
[self sendEvent:kAddAccountFailureEvent properties:@{}];
157+
[self sendError:error];
158+
}
101159
- (void)trackAccountRemove { [self sendEvent:kRemoveAccountEvent properties:@{}]; }
160+
- (void)trackAccountRemoveError:(NSError *)error {
161+
[self sendEvent:kRemoveAccountEvent properties:@{}];
162+
[self sendError:error];
163+
}
102164
- (void)trackSyncWithStarted:(NSUInteger)started
103165
running:(NSUInteger)running
104166
finished:(NSUInteger)finished { [self sendEvent:kSyncEvent properties:@{ @"started" : @(started),
105167
@"running" : @(running),
106168
@"finished" : @(finished) }]; }
169+
- (void)trackSyncError:(NSError *)error {
170+
[self sendError:error];
171+
}
107172

108173
- (void)trackRebuildAction { [self sendEvent:kRebuildActionEvent properties:@{}]; }
109174
- (void)trackAbortAction { [self sendEvent:kAbortActionEvent properties:@{}]; }
@@ -118,4 +183,14 @@ - (void)sendEvent:(BRAnalyticsEvent *)name properties:(NSDictionary *)properties
118183
}
119184
}
120185

186+
#pragma mark - Issues -
187+
188+
- (void)sendError:(NSError *)error {
189+
[SentrySDK captureError:error];
190+
191+
// SentryEvent *event = [[SentryEvent alloc] initWithError:error];
192+
// event.message = [[SentryMessage alloc] initWithFormatted:error.localizedDescription];
193+
// [SentrySDK captureEvent:event];
194+
}
195+
121196
@end

Bitrise/Environment/BRNotificationDispatcher.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNot
113113
switch (notification.activationType) {
114114
case NSUserNotificationActivationTypeActionButtonClicked: {
115115
BRLog(LL_VERBOSE, LL_CORE, @"Action clicked");
116-
BROpenBuildCommand *openCommand = [[BROpenBuildCommand alloc] initWithBuildSlug:notification.userInfo[kBRNotificationBuildSlugKey]];
116+
BROpenBuildCommand *openCommand = [[BROpenBuildCommand alloc] initWithBuildSlug:notification.userInfo[kBRNotificationBuildSlugKey] tab:BRBuildPageTabLogs];
117117
[openCommand execute:nil];
118118
break;
119119
}

Bitrise/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundleShortVersionString</key>
2424
<string>$(MARKETING_VERSION)</string>
2525
<key>CFBundleVersion</key>
26-
<string>2040</string>
26+
<string>2094</string>
2727
<key>LSApplicationCategoryType</key>
2828
<string>public.app-category.developer-tools</string>
2929
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)