Skip to content
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

[CP-XXX] Enhancements for Mudita Center Release Process #1406

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file contains MUDITA_CENTER_PRERELEASE_ENABLED variable which should be removed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ROLLBAR_TOKEN=
# [Optional] Access token for dummy-account that has an access to Mudita private repositories. This variable is needed only in development and build production app.
GITHUB_ACCESS_TOKEN=

# [Optional] Name of the repository from which the application retrieves update packages. It is crucial for the application update process, enabling the determination of the update source.
RELEASES_REPOSITORY_NAME=

# [Optional] client id of the Microsoft Outlook application used for calendars and contacts
LOGIN_MICROSOFT_ONLINE_CLIENT_ID=

Expand Down
9 changes: 5 additions & 4 deletions packages/app/src/__deprecated__/main/autoupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { autoUpdater } from "electron-updater"
import { ipcMain } from "electron-better-ipc"
import { BrowserWindow } from "electron"
import logger from "App/__deprecated__/main/utils/logger"
import { Feature, flags } from "App/feature-flags"

export enum AppUpdateEvent {
Available = "app-update-available",
Expand All @@ -31,17 +30,19 @@ export const mockAutoupdate = (win: BrowserWindow): void => {
})
}

const token = process.env.GITHUB_ACCESS_TOKEN
const repo = process.env.RELEASES_REPOSITORY_NAME

export default (win: BrowserWindow): void => {
autoUpdater.setFeedURL({
token,
repo,
private: true,
provider: "github",
token: process.env.GITHUB_ACCESS_TOKEN,
owner: "Mudita",
repo: "mudita-center",
})
autoUpdater.logger = logger
autoUpdater.autoDownload = false
autoUpdater.allowPrerelease = flags.get(Feature.MuditaCenterPrereleaseEnabled)
autoUpdater.autoInstallOnAppQuit = false

autoUpdater.on("update-available", ({ version }) => {
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/feature-flags/constants/feature.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export enum Feature {
MessagesThreadCallsEnabled = "messages-thread-calls-enabled",
MessagesCallFromThreadEnabled = "messages-call-from-thread-enabled",
MessagesDraftStatus = "messages-draft-status",
MuditaCenterPrereleaseEnabled = "mudita-center-prerelease-enabled",
ContactForwardEnabled = "contact-forward-enabled",
ContactBlockingEnabled = "contact-blocking-enabled",
ContactPhoneFieldIconsEnabled = "contact-phone-field-icons-enabled",
Expand Down
7 changes: 0 additions & 7 deletions packages/app/src/feature-flags/features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import { EnvironmentConfig } from "App/feature-flags/types"
import { Feature, Environment } from "App/feature-flags/constants"

const muditaCenterPrereleaseEnabled =
process.env.MUDITA_CENTER_PRERELEASE_ENABLED === "1"
const loggerEnabled = process.env.DEV_DEVICE_LOGGER_ENABLED !== "0"

export const features: EnvironmentConfig = {
Expand All @@ -31,11 +29,6 @@ export const features: EnvironmentConfig = {
[Environment.Production]: false,
[Environment.AlphaProduction]: true,
},
[Feature.MuditaCenterPrereleaseEnabled]: {
[Environment.Development]: true,
[Environment.Production]: muditaCenterPrereleaseEnabled,
[Environment.AlphaProduction]: true,
},
[Feature.MessagesThreadCallsEnabled]: {
[Environment.Development]: true,
[Environment.Production]: false,
Expand Down