forked from Ivasoft/mattermost-mobile
Compare commits
139 Commits
release-2.
...
ios-pr-sen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0aad59773 | ||
|
|
09c379c548 | ||
|
|
ccca219ec2 | ||
|
|
a7e1624a02 | ||
|
|
e431d1d558 | ||
|
|
833bcb02fa | ||
|
|
fe527a3ec6 | ||
|
|
bbf328cb93 | ||
|
|
222a51ae6f | ||
|
|
3b967434aa | ||
|
|
0cac047a4c | ||
|
|
e6b139d526 | ||
|
|
343e22f9e4 | ||
|
|
5885c0aced | ||
|
|
eea69f9c61 | ||
|
|
04a807a153 | ||
|
|
3015dff322 | ||
|
|
5ce793dcb1 | ||
|
|
9b8738877c | ||
|
|
1aec12ecac | ||
|
|
d1fa198f93 | ||
|
|
a6b28a74af | ||
|
|
764d48ee48 | ||
|
|
f3abc3a7ed | ||
|
|
13b1cdfee6 | ||
|
|
4f0df2ded3 | ||
|
|
4a0f412025 | ||
|
|
78a94f0f7e | ||
|
|
0287b58b92 | ||
|
|
90b0c275b3 | ||
|
|
bd8e31e62f | ||
|
|
7687c3bc8c | ||
|
|
c1e7c04e17 | ||
|
|
2fc35f4c46 | ||
|
|
a2589bb0d0 | ||
|
|
be1e9b2db1 | ||
|
|
55293172da | ||
|
|
6adf861054 | ||
|
|
70dffc349f | ||
|
|
ea37527412 | ||
|
|
99a236fc40 | ||
|
|
11fd493c81 | ||
|
|
e3dd270f7d | ||
|
|
3fdb07479f | ||
|
|
7328918825 | ||
|
|
ecb394755c | ||
|
|
e0abda7fb6 | ||
|
|
13532993e0 | ||
|
|
f971b29ba5 | ||
|
|
fc6b720ce8 | ||
|
|
7d057daaf1 | ||
|
|
decb020b7d | ||
|
|
841f64c61a | ||
|
|
7c02415ab6 | ||
|
|
0c42f51bbe | ||
|
|
fc316acee3 | ||
|
|
e6809bbacf | ||
|
|
ace7641dc5 | ||
|
|
b3cc0508a7 | ||
|
|
0fe00f5013 | ||
|
|
7d57e1bcef | ||
|
|
baeff34bfe | ||
|
|
384ea6d2f2 | ||
|
|
c791c4f7fd | ||
|
|
9015a8d13d | ||
|
|
bd5e305c0c | ||
|
|
9b4632f146 | ||
|
|
cb54cd3e2b | ||
|
|
c636475122 | ||
|
|
15fc901968 | ||
|
|
05abffdd91 | ||
|
|
4316ea0c41 | ||
|
|
829aa2c815 | ||
|
|
2221c0b9e1 | ||
|
|
323b3b5f11 | ||
|
|
7a84abbea5 | ||
|
|
9d516b8e9b | ||
|
|
8a2475714e | ||
|
|
28f5906358 | ||
|
|
93d1827e15 | ||
|
|
a731a878e6 | ||
|
|
c0e2eebaef | ||
|
|
32b64664e4 | ||
|
|
23c54f170e | ||
|
|
69b32f689c | ||
|
|
4072f44295 | ||
|
|
1d8740ae94 | ||
|
|
9d013b3add | ||
|
|
b9e7e10e81 | ||
|
|
ca5ccbe19d | ||
|
|
299359913f | ||
|
|
f3e32e7eeb | ||
|
|
a7b1cf5a8d | ||
|
|
92551f9dcc | ||
|
|
67525b755c | ||
|
|
b9bb817fed | ||
|
|
a88dc96af7 | ||
|
|
5bc0afdc70 | ||
|
|
ba9b0b3a12 | ||
|
|
a6ad2daa6c | ||
|
|
cc7082dd9a | ||
|
|
f4b4e409bb | ||
|
|
1e713fe48f | ||
|
|
a7d560bb84 | ||
|
|
cb5d9f2c99 | ||
|
|
f04064f475 | ||
|
|
a5f7c1b66e | ||
|
|
cb0de55e34 | ||
|
|
94ae570873 | ||
|
|
be6029eb94 | ||
|
|
3089686137 | ||
|
|
5fa0160ff2 | ||
|
|
4a9d186857 | ||
|
|
151598f425 | ||
|
|
f88761e00c | ||
|
|
4849aff01a | ||
|
|
144dc23524 | ||
|
|
dda0a9b210 | ||
|
|
ccc11a5e3e | ||
|
|
aa8cef1631 | ||
|
|
dd3e993a93 | ||
|
|
c9665d75c1 | ||
|
|
958378603b | ||
|
|
dce5b8dc49 | ||
|
|
bd6c877037 | ||
|
|
5b2ac6dd11 | ||
|
|
797fbe030e | ||
|
|
19cde79717 | ||
|
|
a2ba20478a | ||
|
|
1e2f0622da | ||
|
|
8a60ae5bf5 | ||
|
|
bd1cb1494c | ||
|
|
81d73b960b | ||
|
|
f8d5cb99af | ||
|
|
e60d11772d | ||
|
|
9b8cb9e9fa | ||
|
|
838008c274 | ||
|
|
a85522af90 | ||
|
|
ff2df3559d |
@@ -562,14 +562,18 @@ workflows:
|
||||
- /^build-ios-beta-\d+$/
|
||||
|
||||
- build-android-pr:
|
||||
context: mattermost-mobile-android-pr
|
||||
context:
|
||||
- mattermost-mobile-android-pr
|
||||
- mattermost-mobile-sentry
|
||||
requires:
|
||||
- test
|
||||
filters:
|
||||
branches:
|
||||
only: /^(build|android)-pr-.*/
|
||||
- build-ios-pr:
|
||||
context: mattermost-mobile-ios-pr
|
||||
context:
|
||||
- mattermost-mobile-ios-pr
|
||||
- mattermost-mobile-sentry
|
||||
requires:
|
||||
- test
|
||||
filters:
|
||||
@@ -605,7 +609,7 @@ workflows:
|
||||
# - /^build-ios-\d+$/
|
||||
# - /^build-ios-beta-\d+$/
|
||||
# - /^build-ios-sim-\d+$/
|
||||
|
||||
|
||||
# - github-release:
|
||||
# context: mattermost-mobile-unsigned
|
||||
# requires:
|
||||
|
||||
@@ -85,15 +85,6 @@ project.ext.react = [
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
|
||||
|
||||
if (System.getenv("SENTRY_ENABLED") == "true") {
|
||||
project.ext.sentryCli = [
|
||||
logLevel: "error",
|
||||
flavorAware: false
|
||||
]
|
||||
|
||||
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
* - An APK that only works on ARM devices
|
||||
@@ -145,7 +136,7 @@ android {
|
||||
applicationId "com.mattermost.rnbeta"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 430
|
||||
versionCode 431
|
||||
versionName "2.0.0"
|
||||
testBuildType System.getProperty('testBuildType', 'debug')
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
@@ -378,6 +369,15 @@ task copyDownloadableDepsToLibs(type: Copy) {
|
||||
into 'libs'
|
||||
}
|
||||
|
||||
if (System.getenv("SENTRY_ENABLED") == "true") {
|
||||
project.ext.sentryCli = [
|
||||
logLevel: "error",
|
||||
flavorAware: false
|
||||
]
|
||||
|
||||
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
import {useManagedConfig} from '@mattermost/react-native-emm';
|
||||
import {useIsFocused, useNavigation, useRoute} from '@react-navigation/native';
|
||||
import * as Sentry from '@sentry/react-native';
|
||||
import React, {useCallback, useEffect} from 'react';
|
||||
import {useIntl} from 'react-intl';
|
||||
import {BackHandler, DeviceEventEmitter, StyleSheet, ToastAndroid} from 'react-native';
|
||||
@@ -13,9 +14,13 @@ import FreezeScreen from '@components/freeze_screen';
|
||||
import TeamSidebar from '@components/team_sidebar';
|
||||
import {Navigation as NavigationConstants, Screens} from '@constants';
|
||||
import {useTheme} from '@context/theme';
|
||||
import DatabaseManager from '@database/manager';
|
||||
import {subscribeActiveServers} from '@database/subscription/servers';
|
||||
import {useIsTablet} from '@hooks/device';
|
||||
import {resetToTeams} from '@screens/navigation';
|
||||
import NavigationStore from '@store/navigation_store';
|
||||
import ServersModel from '@typings/database/models/app/servers';
|
||||
import {getBuildTags, getExtraContext, getUserContext} from '@utils/sentry';
|
||||
|
||||
import AdditionalTabletView from './additional_tablet_view';
|
||||
import CategoriesList from './categories_list';
|
||||
@@ -111,6 +116,32 @@ const ChannelListScreen = (props: ChannelProps) => {
|
||||
return () => back.remove();
|
||||
}, [handleBackPress]);
|
||||
|
||||
useEffect(() => {
|
||||
const activeServerUrlObserver = async (servers: ServersModel[]) => {
|
||||
const server = servers?.length ? servers.reduce((a, b) => (b.lastActiveAt > a.lastActiveAt ? b : a)) : undefined;
|
||||
|
||||
if (server) {
|
||||
const database = DatabaseManager.serverDatabases[server.url]?.database;
|
||||
if (database) {
|
||||
const userContext = await getUserContext(database);
|
||||
Sentry.setContext('User-Information', userContext);
|
||||
|
||||
const buildContext = await getBuildTags(database);
|
||||
Sentry.setContext('App-Build Information', buildContext);
|
||||
|
||||
const extraContext = await getExtraContext(database);
|
||||
Sentry.setContext('Server-Information', extraContext);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const subscription = subscribeActiveServers(activeServerUrlObserver);
|
||||
|
||||
return () => {
|
||||
subscription?.unsubscribe();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<FreezeScreen freeze={!isFocused}>
|
||||
{<Animated.View style={top}/>}
|
||||
|
||||
@@ -1,26 +1,22 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Database} from '@nozbe/watermelondb';
|
||||
import {Alert} from 'react-native';
|
||||
import {
|
||||
setJSExceptionHandler,
|
||||
|
||||
// setNativeExceptionHandler
|
||||
} from 'react-native-exception-handler';
|
||||
import {setJSExceptionHandler} from 'react-native-exception-handler';
|
||||
|
||||
import {DEFAULT_LOCALE, getTranslations, t} from '@i18n';
|
||||
import {dismissAllModals} from '@screens/navigation';
|
||||
import {ClientError} from '@utils/client_error';
|
||||
import {
|
||||
captureException,
|
||||
captureJSException,
|
||||
initializeSentry,
|
||||
LOGGER_NATIVE,
|
||||
} from '@utils/sentry';
|
||||
import {captureException, captureJSException, initializeSentry, LOGGER_NATIVE} from '@utils/sentry';
|
||||
|
||||
import {logWarning} from './log';
|
||||
|
||||
class JavascriptAndNativeErrorHandler {
|
||||
private activeServerDatabase: Database | undefined;
|
||||
|
||||
private errorContext: any;
|
||||
|
||||
initializeErrorHandling = () => {
|
||||
initializeSentry();
|
||||
setJSExceptionHandler(this.errorHandler, false);
|
||||
@@ -30,7 +26,7 @@ class JavascriptAndNativeErrorHandler {
|
||||
|
||||
nativeErrorHandler = (e: string) => {
|
||||
logWarning('Handling native error ' + e);
|
||||
captureException(e, LOGGER_NATIVE);
|
||||
captureException(e, {logger: LOGGER_NATIVE, ...this.errorContext});
|
||||
};
|
||||
|
||||
errorHandler = (e: Error | ClientError, isFatal: boolean) => {
|
||||
@@ -42,7 +38,8 @@ class JavascriptAndNativeErrorHandler {
|
||||
}
|
||||
|
||||
logWarning('Handling Javascript error', e, isFatal);
|
||||
captureJSException(e, isFatal);
|
||||
|
||||
captureJSException(e, isFatal, {logger: LOGGER_NATIVE, ...this.errorContext});
|
||||
|
||||
if (isFatal && e instanceof Error) {
|
||||
const translations = getTranslations(DEFAULT_LOCALE);
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {Database, Q} from '@nozbe/watermelondb';
|
||||
import {Breadcrumb} from '@sentry/types';
|
||||
import {Platform} from 'react-native';
|
||||
import {Navigation} from 'react-native-navigation';
|
||||
|
||||
import Config from '@assets/config.json';
|
||||
import {MM_TABLES} from '@constants/database';
|
||||
import {getCurrentChannel} from '@queries/servers/channel';
|
||||
import {getConfig, getCurrentTeamId} from '@queries/servers/system';
|
||||
import {getCurrentUser} from '@queries/servers/user';
|
||||
import MyChannelModel from '@typings/database/models/servers/my_channel';
|
||||
import MyTeamModel from '@typings/database/models/servers/my_team';
|
||||
|
||||
import {ClientError} from './client_error';
|
||||
import {logError, logWarning} from './log';
|
||||
import {logWarning} from './log';
|
||||
|
||||
export const BREADCRUMB_UNCAUGHT_APP_ERROR = 'uncaught-app-error';
|
||||
export const BREADCRUMB_UNCAUGHT_NON_ERROR = 'uncaught-non-error';
|
||||
@@ -17,6 +25,7 @@ export const LOGGER_JAVASCRIPT_WARNING = 'javascript_warning';
|
||||
export const LOGGER_NATIVE = 'native';
|
||||
|
||||
let Sentry: any;
|
||||
|
||||
export function initializeSentry() {
|
||||
if (!Config.SentryEnabled) {
|
||||
return;
|
||||
@@ -33,7 +42,21 @@ export function initializeSentry() {
|
||||
return;
|
||||
}
|
||||
|
||||
Sentry.init({dsn, ...Config.SentryOptions});
|
||||
Sentry.init({
|
||||
dsn,
|
||||
tracesSampleRate: 0.2,
|
||||
integrations: [
|
||||
new Sentry.ReactNativeTracing({
|
||||
|
||||
// Pass instrumentation to be used as `routingInstrumentation`
|
||||
routingInstrumentation: new Sentry.ReactNativeNavigationInstrumentation(
|
||||
Navigation,
|
||||
),
|
||||
}),
|
||||
],
|
||||
sendDefaultPii: false,
|
||||
...Config.SentryOptions,
|
||||
});
|
||||
}
|
||||
|
||||
function getDsn() {
|
||||
@@ -46,24 +69,20 @@ function getDsn() {
|
||||
return '';
|
||||
}
|
||||
|
||||
export function captureException(error: Error | string, logger: string) {
|
||||
export function captureException(error: Error | string, errorContext: any) {
|
||||
if (!Config.SentryEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!error || !logger) {
|
||||
logWarning('captureException called with missing arguments', error, logger);
|
||||
if (!error || !errorContext) {
|
||||
logWarning('captureException called with missing arguments', error, errorContext);
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Get current server config and other relevant data
|
||||
|
||||
capture(() => {
|
||||
Sentry.captureException(error, {logger});
|
||||
});
|
||||
Sentry.captureException(error, {...errorContext});
|
||||
}
|
||||
|
||||
export function captureJSException(error: Error | ClientError, isFatal: boolean) {
|
||||
export function captureJSException(error: Error | ClientError, isFatal: boolean, errorContext: any) {
|
||||
if (!Config.SentryEnabled) {
|
||||
return;
|
||||
}
|
||||
@@ -76,7 +95,10 @@ export function captureJSException(error: Error | ClientError, isFatal: boolean)
|
||||
if (error instanceof ClientError) {
|
||||
captureClientErrorAsBreadcrumb(error, isFatal);
|
||||
} else {
|
||||
captureException(error, LOGGER_JAVASCRIPT);
|
||||
captureException(error, {
|
||||
logger: LOGGER_JAVASCRIPT,
|
||||
...errorContext,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,128 +142,83 @@ function captureClientErrorAsBreadcrumb(error: ClientError, isFatal: boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
// Wrapper function to any calls to Sentry so that we can gather any necessary extra data
|
||||
// before sending.
|
||||
function capture(captureFunc: () => void, config?: ClientConfig) {
|
||||
if (config?.EnableDiagnostics !== 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
let hasUserContext = false;
|
||||
const userContext = getUserContext();
|
||||
if (userContext) {
|
||||
hasUserContext = true;
|
||||
Sentry.setUserContext(userContext);
|
||||
}
|
||||
|
||||
const extraContext = getExtraContext();
|
||||
if (Object.keys(extraContext).length) {
|
||||
Sentry.setExtraContext(extraContext);
|
||||
}
|
||||
|
||||
const buildTags = getBuildTags();
|
||||
if (buildTags) {
|
||||
Sentry.setTagsContext(buildTags);
|
||||
}
|
||||
|
||||
if (hasUserContext) {
|
||||
logWarning('Capturing with Sentry at ' + getDsn() + '...');
|
||||
|
||||
captureFunc();
|
||||
} else {
|
||||
logWarning('No user context, skipping capture');
|
||||
}
|
||||
} catch (e) {
|
||||
// Don't want this to get into an infinite loop again...
|
||||
logError('Exception occurred while sending to Sentry');
|
||||
logError(e);
|
||||
}
|
||||
}
|
||||
|
||||
function getUserContext() {
|
||||
// TODO: Get current user data from active database
|
||||
export const getUserContext = async (database: Database) => {
|
||||
const currentUser = {
|
||||
id: 'currentUserId',
|
||||
locale: 'en',
|
||||
roles: 'multi-server-test-role',
|
||||
};
|
||||
|
||||
if (!currentUser) {
|
||||
return null;
|
||||
const user = await getCurrentUser(database);
|
||||
if (user) {
|
||||
currentUser.id = user.id;
|
||||
currentUser.locale = user.locale;
|
||||
currentUser.roles = user.roles;
|
||||
}
|
||||
|
||||
return {
|
||||
userID: currentUser.id, // This can be changed to id after we upgrade to Sentry >= 0.14.10,
|
||||
userID: currentUser.id,
|
||||
email: '',
|
||||
username: '',
|
||||
extra: {
|
||||
locale: currentUser.locale,
|
||||
roles: currentUser.roles,
|
||||
},
|
||||
|
||||
locale: currentUser.locale,
|
||||
roles: currentUser.roles,
|
||||
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
function getExtraContext() {
|
||||
const context = {};
|
||||
export const getExtraContext = async (database: Database) => {
|
||||
const context = {
|
||||
config: {},
|
||||
currentChannel: {},
|
||||
currentTeam: {},
|
||||
};
|
||||
|
||||
// TODO: Add context based on the active database
|
||||
const config = await getConfig(database);
|
||||
if (config) {
|
||||
context.config = {
|
||||
BuildDate: config.BuildDate,
|
||||
BuildEnterpriseReady: config.BuildEnterpriseReady,
|
||||
BuildHash: config.BuildHash,
|
||||
BuildHashEnterprise: config.BuildHashEnterprise,
|
||||
BuildNumber: config.BuildNumber,
|
||||
};
|
||||
}
|
||||
const currentTeamId = await getCurrentTeamId(database);
|
||||
const myTeam = await database.get<MyTeamModel>(MM_TABLES.SERVER.MY_TEAM).query(Q.where('id', currentTeamId)).fetch();
|
||||
const teamRoles = myTeam?.[0]?.roles;
|
||||
context.currentTeam = {
|
||||
TeamId: currentTeamId,
|
||||
TeamRoles: teamRoles,
|
||||
};
|
||||
|
||||
// const currentTeam = getCurrentTeam(state);
|
||||
// if (currentTeam) {
|
||||
// context.currentTeam = {
|
||||
// id: currentTeam.id,
|
||||
// };
|
||||
// }
|
||||
|
||||
// const currentTeamMember = getCurrentTeamMembership(state);
|
||||
// if (currentTeamMember) {
|
||||
// context.currentTeamMember = {
|
||||
// roles: currentTeamMember.roles,
|
||||
// };
|
||||
// }
|
||||
|
||||
// const currentChannel = getCurrentChannel(state);
|
||||
// if (currentChannel) {
|
||||
// context.currentChannel = {
|
||||
// id: currentChannel.id,
|
||||
// type: currentChannel.type,
|
||||
// };
|
||||
// }
|
||||
|
||||
// const currentChannelMember = getMyCurrentChannelMembership(state);
|
||||
// if (currentChannelMember) {
|
||||
// context.currentChannelMember = {
|
||||
// roles: currentChannelMember.roles,
|
||||
// };
|
||||
// }
|
||||
|
||||
// const config = getConfig(state);
|
||||
// if (config) {
|
||||
// context.config = {
|
||||
// BuildDate: config.BuildDate,
|
||||
// BuildEnterpriseReady: config.BuildEnterpriseReady,
|
||||
// BuildHash: config.BuildHash,
|
||||
// BuildHashEnterprise: config.BuildHashEnterprise,
|
||||
// BuildNumber: config.BuildNumber,
|
||||
// };
|
||||
// }
|
||||
const channel = await getCurrentChannel(database);
|
||||
let channelRoles;
|
||||
if (channel) {
|
||||
const myChannel = await database.get<MyChannelModel>(MM_TABLES.SERVER.MY_CHANNEL).query(Q.where('id', channel.id)).fetch();
|
||||
channelRoles = myChannel?.[0]?.roles;
|
||||
context.currentChannel = {
|
||||
ChannelId: channel?.id,
|
||||
ChannelRoles: channelRoles,
|
||||
ChannelType: channel?.type,
|
||||
};
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
};
|
||||
|
||||
function getBuildTags() {
|
||||
let tags;
|
||||
export const getBuildTags = async (database: Database) => {
|
||||
const tags = {
|
||||
serverBuildHash: '',
|
||||
serverBuildNumber: '',
|
||||
};
|
||||
|
||||
// TODO: Add context based on the active database
|
||||
|
||||
// const config = getConfig(state);
|
||||
// if (config) {
|
||||
// tags = {
|
||||
// serverBuildHash: config.BuildHash,
|
||||
// serverBuildNumber: config.BuildNumber,
|
||||
// };
|
||||
// }
|
||||
const config = await getConfig(database);
|
||||
if (config) {
|
||||
tags.serverBuildHash = config.BuildHash;
|
||||
tags.serverBuildNumber = config.BuildNumber;
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ lane :upload_file_to_s3 do |options|
|
||||
extension = os_type == "android" ? "*.apk" : "*.ipa"
|
||||
build_folder_path = Dir[File.expand_path('..')].first
|
||||
files = []
|
||||
|
||||
|
||||
unless options[:file].nil? || options[:file].empty?
|
||||
files.push("#{build_folder_path}/#{options[:file]}")
|
||||
else
|
||||
@@ -194,7 +194,7 @@ lane :upload_file_to_s3 do |options|
|
||||
pr_file = File.basename(files.first)
|
||||
plist_file = "#{File.basename(files.first, '.*')}.plist"
|
||||
else
|
||||
version_number = os_type == "android" ?
|
||||
version_number = os_type == "android" ?
|
||||
android_get_version_name(gradle_file: './android/app/build.gradle') :
|
||||
get_version_number(xcodeproj: './ios/Mattermost.xcodeproj', target: 'Mattermost')
|
||||
build_number = os_type == "android" ?
|
||||
@@ -207,7 +207,7 @@ lane :upload_file_to_s3 do |options|
|
||||
s3_folder = is_build_pr ?
|
||||
"#{ENV['AWS_FOLDER_NAME']}/#{ENV['BRANCH_TO_BUILD']}" :
|
||||
"#{ENV['AWS_FOLDER_NAME']}/#{version_number}/#{build_number}"
|
||||
|
||||
|
||||
s3 = Aws::S3::Resource.new(region: s3_region)
|
||||
s3_bucket = s3.bucket(s3_bucket_name)
|
||||
mutex = Mutex.new
|
||||
@@ -254,7 +254,7 @@ lane :upload_file_to_s3 do |options|
|
||||
:install_url => install_url
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
if options[:file] == 'Mattermost-simulator-x86_64.app.zip'
|
||||
pretext = '#### New iOS build for VM/Simulator'
|
||||
msg = "Download link: #{links.first}"
|
||||
@@ -741,7 +741,7 @@ platform :android do
|
||||
properties: {
|
||||
'separateApk' => ENV["SEPARATE_APKS"] || false,
|
||||
'universalApk' => ENV["SEPARATE_APKS"] || false,
|
||||
}
|
||||
},
|
||||
)
|
||||
end
|
||||
|
||||
@@ -850,14 +850,14 @@ def get_apple_api_key
|
||||
f.write("\n") unless index == p8_array.length - 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
api_key = app_store_connect_api_key(
|
||||
key_id: ENV['IOS_API_KEY_ID'],
|
||||
issuer_id: ENV['IOS_API_ISSUER_ID'],
|
||||
key_filepath: "./#{api_key_path}",
|
||||
in_house: ENV['IOS_IN_HOUSE'] == 'true', # optional but may be required if using match/sigh
|
||||
)
|
||||
|
||||
|
||||
File.delete("../#{api_key_path}")
|
||||
end
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "9af51e2edf491c0ea632e369a6566e09b65aa333",
|
||||
"version": "0.13.0"
|
||||
"revision": "2c4af8526e112e3a23df141e988d08a28e475ecd",
|
||||
"version": "0.14.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -12,7 +12,8 @@ if [[ "${SENTRY_ENABLED}" = "true" ]]; then
|
||||
./makeSentryProperties.sh
|
||||
|
||||
export SENTRY_PROPERTIES=sentry.properties
|
||||
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode ./react-native-xcode.sh
|
||||
../node_modules/@sentry/cli/bin/sentry-cli react-native xcode \
|
||||
../node_modules/react-native/scripts/react-native-xcode.sh
|
||||
else
|
||||
echo "Sentry native integration is not enabled"
|
||||
../node_modules/react-native/scripts/react-native-xcode.sh
|
||||
|
||||
@@ -6,7 +6,8 @@ if [[ "${SENTRY_ENABLED}" = "true" ]]; then
|
||||
./makeSentryProperties.sh
|
||||
|
||||
export SENTRY_PROPERTIES=sentry.properties
|
||||
../node_modules/@sentry/cli/bin/sentry-cli upload-dsym
|
||||
../node_modules/@sentry/cli/bin/sentry-cli upload-dif "$DWARF_DSYM_FOLDER_PATH"
|
||||
|
||||
else
|
||||
echo "Not uploading debugging symbols to Sentry because Sentry is disabled"
|
||||
fi
|
||||
|
||||
@@ -21,5 +21,6 @@ module.exports = (async () => {
|
||||
assetExts: assetExts.filter((ext) => ext !== 'svg'),
|
||||
sourceExts: [...sourceExts, 'svg'],
|
||||
},
|
||||
maxWorkers: 2,
|
||||
};
|
||||
})();
|
||||
|
||||
48076
patches/@sentry+react-native+4.6.1.patch
Normal file
48076
patches/@sentry+react-native+4.6.1.patch
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user