Add adhoc release channel for public ad-hoc testing
This commit is contained in:
parent
5f611b74f8
commit
97d31cd1a5
9 changed files with 138 additions and 9 deletions
|
@ -119,7 +119,7 @@ import {
|
|||
} from '../../util/backupMediaDownload';
|
||||
import { getEnvironment, isTestEnvironment } from '../../environment';
|
||||
import { hasAttachmentDownloads } from '../../util/hasAttachmentDownloads';
|
||||
import { isNightly } from '../../util/version';
|
||||
import { isAdhoc, isNightly } from '../../util/version';
|
||||
import { ToastType } from '../../types/Toast';
|
||||
import { isConversationAccepted } from '../../util/isConversationAccepted';
|
||||
import { saveBackupsSubscriberData } from '../../util/backupSubscriptionData';
|
||||
|
@ -382,7 +382,7 @@ export class BackupImportStream extends Writable {
|
|||
log.error(
|
||||
`${this.logId}: errored while processing ${this.frameErrorCount} frames.`
|
||||
);
|
||||
if (isNightly(window.getVersion())) {
|
||||
if (isNightly(window.getVersion()) || isAdhoc(window.getVersion())) {
|
||||
window.reduxActions.toast.showToast({
|
||||
toastType: ToastType.FailedToImportBackup,
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ import {
|
|||
UnsupportedBackupVersion,
|
||||
} from './errors';
|
||||
import { ToastType } from '../../types/Toast';
|
||||
import { isNightly } from '../../util/version';
|
||||
import { isAdhoc, isNightly } from '../../util/version';
|
||||
|
||||
export { BackupType };
|
||||
|
||||
|
@ -431,7 +431,7 @@ export class BackupsService {
|
|||
} catch (error) {
|
||||
log.info(`importBackup: failed, error: ${Errors.toLogFormat(error)}`);
|
||||
|
||||
if (isNightly(window.getVersion())) {
|
||||
if (isNightly(window.getVersion()) || isAdhoc(window.getVersion())) {
|
||||
window.reduxActions.toast.showToast({
|
||||
toastType: ToastType.FailedToImportBackup,
|
||||
});
|
||||
|
|
|
@ -27,7 +27,13 @@ import * as Errors from '../types/errors';
|
|||
import { strictAssert } from '../util/assert';
|
||||
import { drop } from '../util/drop';
|
||||
import * as durations from '../util/durations';
|
||||
import { isAlpha, isAxolotl, isBeta, isStaging } from '../util/version';
|
||||
import {
|
||||
isAdhoc,
|
||||
isAlpha,
|
||||
isAxolotl,
|
||||
isBeta,
|
||||
isStaging,
|
||||
} from '../util/version';
|
||||
|
||||
import * as packageJson from '../../package.json';
|
||||
import type { SettingsChannel } from '../main/settingsChannel';
|
||||
|
@ -489,6 +495,13 @@ export abstract class Updater {
|
|||
private async checkForUpdates(
|
||||
checkType: CheckType
|
||||
): Promise<UpdateInformationType | undefined> {
|
||||
if (isAdhoc(packageJson.version)) {
|
||||
this.logger.info(
|
||||
'checkForUpdates: not checking for updates, this is an adhoc build'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const yaml = await getUpdateYaml();
|
||||
const parsedYaml = parseYaml(yaml);
|
||||
|
||||
|
@ -905,7 +918,10 @@ export function getUpdatesFileName(): string {
|
|||
|
||||
function getChannel(): string {
|
||||
const { version } = packageJson;
|
||||
|
||||
if (isAdhoc(version)) {
|
||||
// we don't want ad hoc versions to update
|
||||
return version;
|
||||
}
|
||||
if (isStaging(version)) {
|
||||
return 'staging';
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { isTestOrMockEnvironment } from '../environment';
|
||||
import { isStagingServer } from './isStagingServer';
|
||||
import { isNightly } from './version';
|
||||
import { isAdhoc, isNightly } from './version';
|
||||
import { everDone as wasRegistrationEverDone } from './registration';
|
||||
|
||||
export function isLinkAndSyncEnabled(version: string): boolean {
|
||||
|
@ -12,5 +12,10 @@ export function isLinkAndSyncEnabled(version: string): boolean {
|
|||
return false;
|
||||
}
|
||||
|
||||
return isStagingServer() || isTestOrMockEnvironment() || isNightly(version);
|
||||
return (
|
||||
isStagingServer() ||
|
||||
isTestOrMockEnvironment() ||
|
||||
isNightly(version) ||
|
||||
isAdhoc(version)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,9 @@ export const isAlpha = (version: string): boolean =>
|
|||
export const isAxolotl = (version: string): boolean =>
|
||||
semver.parse(version)?.prerelease[0] === 'axolotl';
|
||||
|
||||
export const isAdhoc = (version: string): boolean =>
|
||||
semver.parse(version)?.prerelease[0] === 'adhoc';
|
||||
|
||||
export const isStaging = (version: string): boolean =>
|
||||
semver.parse(version)?.prerelease[0] === 'staging';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue