Skip to content

Commit

Permalink
v3.0.0 rc.5 (#2311)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarski authored Feb 10, 2025
1 parent baeb2db commit ea03776
Show file tree
Hide file tree
Showing 52 changed files with 341 additions and 283 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ PHRASE_API_KEY_DEV=

# [Standard] Mudita Center Server URL to access to external services via proxy
MUDITA_CENTER_SERVER_URL=
MUDITA_CENTER_SERVER_V2_URL=

# [Standard] Rollbar Token needed to connect user’s app with Rollbar account
ROLLBAR_TOKEN=
Expand Down Expand Up @@ -85,6 +84,3 @@ DEV_API_CONFIG=

# [Dev Mode] Path to directory with flash packages for Mudita Harmony
DEV_FLASH_PACKAGE_PATH=

# Token for using dev server for Kompakt OS update info
KOMPAKT_OS_UPDATE_DEV_TOKEN=
13 changes: 13 additions & 0 deletions .github/workflows/nexus-mass-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,19 @@ jobs:
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Calculate new checksum and file size for Mudita-Center.exe
if: matrix.os == 'Windows'
run: |
$filePath = "./apps/mudita-center/release/Mudita-Center.exe"
$sha512 = Get-FileHash -Path $filePath -Algorithm SHA512 | Select-Object -ExpandProperty Hash
$fileSize = (Get-Item -Path $filePath).length
$latestYmlPath = "./apps/mudita-center/release/latest.yml"
(Get-Content $latestYmlPath) -replace 'sha512:.*', "sha512: $sha512" |
Set-Content $latestYmlPath
(Get-Content $latestYmlPath) -replace 'size:.*', "size: $fileSize" |
Set-Content $latestYmlPath
shell: powershell
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/nexus-mock-pre-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,6 @@ jobs:
if: matrix.os == 'macOS'
run: |
codesign -v -v apps/mudita-center/release/mac/Mudita\ Center.app
- name: Signing via Digicert
if: matrix.os == 'Windows'
env:
SM_HOST: ${{ secrets.SM_HOST }}
SM_API_KEY: ${{ secrets.SM_API_KEY }}
SM_CLIENT_CERT_FILE: "C:\\actions-runner\\certs\\Certificate_pkcs12.p12"
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }}
run: |
SET SM_HOST=%SM_HOST%
SET SM_API_KEY=%SM_API_KEY%
SET SM_CLIENT_CERT_FILE=%SM_CLIENT_CERT_FILE%
SET SM_CLIENT_CERT_PASSWORD=%SM_CLIENT_CERT_PASSWORD%
SET SM_CODE_SIGNING_CERT_SHA1_HASH=%SM_CODE_SIGNING_CERT_SHA1_HASH%
SET PATH=%PATH%;"C:\Program Files\DigiCert\DigiCert One Signing Manager Tools"
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/nexus-pre-production-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,19 @@ jobs:
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Calculate new checksum and file size for Mudita-Center.exe
if: matrix.os == 'Windows'
run: |
$filePath = "./apps/mudita-center/release/Mudita-Center.exe"
$sha512 = Get-FileHash -Path $filePath -Algorithm SHA512 | Select-Object -ExpandProperty Hash
$fileSize = (Get-Item -Path $filePath).length
$latestYmlPath = "./apps/mudita-center/release/latest.yml"
(Get-Content $latestYmlPath) -replace 'sha512:.*', "sha512: $sha512" |
Set-Content $latestYmlPath
(Get-Content $latestYmlPath) -replace 'size:.*', "size: $fileSize" |
Set-Content $latestYmlPath
shell: powershell
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/nexus-pre-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ jobs:
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Calculate new checksum and file size for Mudita-Center.exe
if: matrix.os == 'Windows'
run: |
$filePath = "./apps/mudita-center/release/Mudita-Center.exe"
$sha512 = Get-FileHash -Path $filePath -Algorithm SHA512 | Select-Object -ExpandProperty Hash
$fileSize = (Get-Item -Path $filePath).length
$latestYmlPath = "./apps/mudita-center/release/latest.yml"
(Get-Content $latestYmlPath) -replace 'sha512:.*', "sha512: $sha512" |
Set-Content $latestYmlPath
(Get-Content $latestYmlPath) -replace 'size:.*', "size: $fileSize" |
Set-Content $latestYmlPath
shell: powershell
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/nexus-production-with-os-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ jobs:
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Calculate new checksum and file size for Mudita-Center.exe
if: matrix.os == 'Windows'
run: |
$filePath = "./apps/mudita-center/release/Mudita-Center.exe"
$sha512 = Get-FileHash -Path $filePath -Algorithm SHA512 | Select-Object -ExpandProperty Hash
$fileSize = (Get-Item -Path $filePath).length
$latestYmlPath = "./apps/mudita-center/release/latest.yml"
(Get-Content $latestYmlPath) -replace 'sha512:.*', "sha512: $sha512" |
Set-Content $latestYmlPath
(Get-Content $latestYmlPath) -replace 'size:.*', "size: $fileSize" |
Set-Content $latestYmlPath
shell: powershell
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/nexus-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ jobs:
SET PATH=%PATH%;"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64"
signtool.exe sign /sha1 %SM_CODE_SIGNING_CERT_SHA1_HASH% /tr http://timestamp.digicert.com /td SHA256 /fd SHA256 ./apps/mudita-center/release/Mudita-Center.exe
shell: cmd
- name: Calculate new checksum and file size for Mudita-Center.exe
if: matrix.os == 'Windows'
run: |
$filePath = "./apps/mudita-center/release/Mudita-Center.exe"
$sha512 = Get-FileHash -Path $filePath -Algorithm SHA512 | Select-Object -ExpandProperty Hash
$fileSize = (Get-Item -Path $filePath).length
$latestYmlPath = "./apps/mudita-center/release/latest.yml"
(Get-Content $latestYmlPath) -replace 'sha512:.*', "sha512: $sha512" |
Set-Content $latestYmlPath
(Get-Content $latestYmlPath) -replace 'size:.*', "size: $fileSize" |
Set-Content $latestYmlPath
shell: powershell
- name: Push artifacts to nexus registry from Windows
if: matrix.os == 'Windows'
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe("E2E mock lock sample", () => {
body: getBodyAsRecord(DEFAULT_RESPONSES.FEATURE_DATA?.GET?.[1]?.body),
match: {
expected: {
feature: "fileManager",
feature: "mc-file-manager-internal",
lang: "en-US",
},
},
Expand All @@ -116,7 +116,7 @@ describe("E2E mock lock sample", () => {
),
match: {
expected: {
feature: "contacts",
feature: "mc-contacts",
lang: "en-US",
},
},
Expand Down Expand Up @@ -146,7 +146,7 @@ describe("E2E mock lock sample", () => {
),
match: {
expected: {
feature: "fileManager",
feature: "mc-file-manager-internal",
lang: "en-US",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("E2E mock match sample", () => {
method: "GET",
status: 200,
match: {
expected: { feature: "contacts", lang: "en-US" },
expected: { feature: "mc-contacts", lang: "en-US" },
},
})
// if body of FEATURE_DATA request is equal to { feature: "contacts", lang: "en-US" } then return body: contactsConfig.
Expand All @@ -42,7 +42,7 @@ describe("E2E mock match sample", () => {
method: "GET",
status: 200,
match: {
expected: { feature: "contacts", lang: "en-US" },
expected: { feature: "mc-contacts", lang: "en-US" },
},
})
E2EMockClient.mockResponse({
Expand Down
4 changes: 2 additions & 2 deletions apps/mudita-center/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/mudita-center/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mudita-center",
"version": "3.0.0-rc.4",
"version": "3.0.0-rc.5",
"description": "Mudita Center",
"main": "./dist/main.js",
"productName": "Mudita Center",
Expand Down
7 changes: 5 additions & 2 deletions apps/mudita-center/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import {
AppEvents,
callRenderer,
getMainAppWindow,
MuditaCenterServerRoutes,
openDevToolsOnceDomReady,
preventDefaultShortcuts,
registerShortcuts,
Expand Down Expand Up @@ -327,7 +328,9 @@ const createOpenWindowListener = (

ipcMain.answerRenderer(BrowserActions.PolicyOpenBrowser, () =>
shell.openExternal(
`${process.env.MUDITA_CENTER_SERVER_URL ?? ""}/privacy-policy-url`
`${process.env.MUDITA_CENTER_SERVER_URL ?? ""}/${
MuditaCenterServerRoutes.PrivacyPolicyUrl
}`
)
)
ipcMain.answerRenderer(BrowserActions.UpdateOpenBrowser, () =>
Expand Down Expand Up @@ -457,7 +460,7 @@ ipcMain.answerRenderer(GoogleAuthActions.OpenWindow, async (scope: Scope) => {
scopeUrl = "https://www.googleapis.com/auth/contacts"
break
}
const url = `${process.env.MUDITA_CENTER_SERVER_URL}/google-auth-init`
const url = `${process.env.MUDITA_CENTER_SERVER_URL}/${MuditaCenterServerRoutes.GoogleAuthInit}`
void (await googleAuthWindow.loadURL(`${url}?scope=${scopeUrl}`))
} else {
googleAuthWindow.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

import { Client } from "Core/__deprecated__/api/mudita-center-server/client"
import MockAdapter from "axios-mock-adapter"
import axios from "axios"
import { MuditaCenterServerRoutes } from "Core/__deprecated__/api/mudita-center-server/mudita-center-server-routes"
import MockAdapter from "axios-mock-adapter"
import { MuditaCenterServerRoutes } from "shared/utils"
import { Client } from "Core/__deprecated__/api/mudita-center-server/client"

const previousEnvironment = { ...process.env }

Expand Down
14 changes: 6 additions & 8 deletions libs/core/__deprecated__/api/mudita-center-server/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

import axios, { AxiosInstance, AxiosResponse } from "axios"
import { EntryCollection } from "contentful"
import https from "https"
import { MuditaCenterServerRoutes } from "shared/utils"
import { NewsEntry } from "Core/news/dto"
import { OsEnvironment } from "Core/update/constants"
import { ReleaseManifest } from "Core/update/dto"
import { ClientInterface } from "Core/__deprecated__/api/mudita-center-server/client.interface"
import { MuditaCenterServerRoutes } from "Core/__deprecated__/api/mudita-center-server/mudita-center-server-routes"
import { Product } from "Core/__deprecated__/main/constants"
import axios, { AxiosInstance, AxiosResponse } from "axios"
import { EntryCollection } from "contentful"
import https from "https"

export interface getLatestProductionReleaseParams {
product: Product
Expand All @@ -31,11 +31,9 @@ interface ExternalUsageDeviceResponse {
export class Client implements ClientInterface {
private httpClient: AxiosInstance

constructor(timeout?: number, apiV2?: boolean) {
constructor(timeout?: number) {
this.httpClient = axios.create({
baseURL: apiV2
? (process.env.MUDITA_CENTER_SERVER_V2_URL as string)
: (process.env.MUDITA_CENTER_SERVER_URL as string),
baseURL: process.env.MUDITA_CENTER_SERVER_URL as string,
httpsAgent: new https.Agent({
rejectUnauthorized: false,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

import { Client } from "Core/__deprecated__/api/mudita-center-server/client"

export const createClient = (timeout?: number, apiV2?: boolean): Client => new Client(timeout, apiV2)
export const createClient = (timeout?: number): Client => new Client(timeout)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const checkForUpdateAndGetNewData = async (
const { newsItems: localNews } = await fs.readJson(newsFilePath)

try {
const client = createClient(undefined, true)
const client = createClient()
const onlineNews: EntryCollection<NewsEntry> = await client.getNews({
limit: 6,
})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions libs/core/__deprecated__/renderer/svg/battery-charging-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ea03776

Please sign in to comment.