-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable analytics on CI #3929
Disable analytics on CI #3929
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -57,8 +57,9 @@ class SendAnalyticsTask extends DefaultTask { | |||||
def sendAnalytics() { | ||||||
try { | ||||||
def env = System.getenv() | ||||||
def disableAnalytics= env['REALM_DISABLE_ANALYTICS'] | ||||||
if (disableAnalytics == null || disableAnalytics != "true") { | ||||||
def disableAnalytics = env['REALM_DISABLE_ANALYTICS'] != null | ||||||
def isCI = env['CI'] != null | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly with |
||||||
if (!disableAnalytics && !isCI) { | ||||||
Comment on lines
+60
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would have the unfortunate side-effect of disabling analytics when Is this what you meant to do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It matches the semantics for iOS and Node/Electron so it made sense to align on all platforms: realm-js/lib/submit-analytics.js Line 99 in 48144ae
I feel like just setting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the integration tests, we have https://github.com/realm/realm-js/blob/master/.github/workflows/integration-tests.yml#L4 ( Moreover, we should set |
||||||
send() | ||||||
} | ||||||
} catch(all) {} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!= null
is already stronger than== true
. IfREALM_DISABLE_ANALYTICS
is set totrue
, then it won't be null.