Skip to content

Commit

Permalink
Release v2.5.0 - to stage (#2199)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Karski <[email protected]>
Co-authored-by: Michał Kurczewski <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2024
1 parent 773bbdf commit a009946
Show file tree
Hide file tree
Showing 21 changed files with 185 additions and 71 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/nexus-mock-pre-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ 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
18 changes: 18 additions & 0 deletions .github/workflows/nexus-pre-production-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,24 @@ 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
18 changes: 18 additions & 0 deletions .github/workflows/nexus-pre-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,24 @@ 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Here we write upgrading notes for brands. It's a team effort to make them as
straightforward as possible.

## [2.5.0] - 2024-12-02

Starting with version 2.5.0, users will be able to synchronize the time and date on the Harmony and will be informed about an error in case of fail in the synchronization.

### Added

- Added time synchronization for Mudita Harmony.

## [2.4.0] - 2024-09-16

In this release, we have updated the Help section in the Mudita Center application. As of version 2.4.0, users can benefit from a refreshed help section with intuitive navigation. The article search functionality is also available. In addition, we have fixed two bugs occurring in our software.
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": "2.4.0",
"version": "2.5.0",
"description": "Mudita Center",
"main": "./dist/main.js",
"productName": "Mudita Center",
Expand Down
2 changes: 1 addition & 1 deletion libs/core/files-manager/actions/upload-file.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const uploadFile = createAsyncThunk<

if (!openFileResult.ok || !openFileResult.data) {
dispatch(setUploadBlocked(false))
return rejectWithValue("no files to upload")
return
}

const filePaths = openFileResult.data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, { FunctionComponent, useEffect } from "react"
import { BackupError, Modal } from "generic-view/ui"
import { useDispatch, useSelector } from "react-redux"
import {
BackupProcessStatus,
cleanBackupProcess,
selectActiveApiDeviceId,
selectBackupProcessStatus,
Expand All @@ -18,7 +19,7 @@ const BackupErrorModal: FunctionComponent = () => {
const dispatch = useDispatch()
const activeDeviceId = useSelector(selectActiveApiDeviceId)
const backupStatus = useSelector(selectBackupProcessStatus)
const opened = backupStatus === "FAILED" && !activeDeviceId
const opened = backupStatus === BackupProcessStatus.Failed && !activeDeviceId

const onClose = () => {
dispatch(cleanBackupProcess())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BackupRestoreError, Modal } from "generic-view/ui"
import { useDispatch, useSelector } from "react-redux"
import {
cleanRestoreProcess,
RestoreProcessStatus,
selectActiveApiDeviceId,
selectBackupRestoreStatus,
setDeviceErrorModalOpened,
Expand All @@ -18,7 +19,7 @@ const RestoreErrorModal: FunctionComponent = () => {
const dispatch = useDispatch()
const activeDevice = useSelector(selectActiveApiDeviceId)
const restoreStatus = useSelector(selectBackupRestoreStatus)
const opened = restoreStatus === "FAILED" && !activeDevice
const opened = restoreStatus === RestoreProcessStatus.Failed && !activeDevice

const onClose = () => {
dispatch(cleanRestoreProcess())
Expand Down
1 change: 1 addition & 0 deletions libs/generic-view/store/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from "./lib/file-transfer/send-file.action"
export * from "./lib/file-transfer/get-file.action"
export * from "./lib/backup/load-backup-metadata.action"
export * from "./lib/backup/restore-backup.action"
export * from "./lib/backup/backup.types"
export * from "./lib/imports/start-import-authorization.action"
export * from "./lib/imports/reducer"
export * from "./lib/imports/actions"
Expand Down
6 changes: 3 additions & 3 deletions libs/generic-view/store/src/lib/backup/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*/

import { createAction } from "@reduxjs/toolkit"
import { BackupProcess } from "./reducer"
import { ActionName } from "../action-names"
import {
BackupProcess,
BackupProcessFileStatus,
BackupProcessStatus,
RestoreProcessStatus,
} from "./reducer"
import { ActionName } from "../action-names"
} from "./backup.types"

export const setBackupProcess = createAction<BackupProcess>(
ActionName.SetBackupProcess
Expand Down
28 changes: 28 additions & 0 deletions libs/generic-view/store/src/lib/backup/backup.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) Mudita sp. z o.o. All rights reserved.
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

export enum BackupProcessStatus {
PreBackup,
FilesTransfer,
SaveFile,
Done,
Failed,
}

export enum BackupProcessFileStatus {
Pending,
InProgress,
Done,
}

export enum RestoreProcessStatus {
PasswordNotRequired,
PasswordRequired,
PreRestore,
FilesTransfer,
Restoring,
Done,
Failed,
}
21 changes: 16 additions & 5 deletions libs/generic-view/store/src/lib/backup/create-backup.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
setBackupProcessStatus,
} from "./actions"
import { refreshBackupList } from "./refresh-backup-list.action"
import { BackupProcessFileStatus, BackupProcessStatus } from "./backup.types"

export const createBackup = createAsyncThunk<
undefined,
Expand Down Expand Up @@ -54,7 +55,7 @@ export const createBackup = createAsyncThunk<

dispatch(
setBackupProcess({
status: "PRE_BACKUP",
status: BackupProcessStatus.PreBackup,
featureFilesTransfer: features.reduce((acc, item) => {
return { ...acc, [item]: { done: false } }
}, {}),
Expand Down Expand Up @@ -107,15 +108,20 @@ export const createBackup = createAsyncThunk<

backupFeaturesFiles = checkPreBackupResponse.data.features
}
dispatch(setBackupProcessStatus("FILES_TRANSFER"))
dispatch(setBackupProcessStatus(BackupProcessStatus.FilesTransfer))

for (let i = 0; i < features.length; ++i) {
if (aborted) {
return rejectWithValue(undefined)
}
const feature = features[i]

dispatch(setBackupProcessFileStatus({ feature, status: "IN_PROGRESS" }))
dispatch(
setBackupProcessFileStatus({
feature,
status: BackupProcessFileStatus.InProgress,
})
)
const filePromise = dispatch(
getFile({
deviceId,
Expand All @@ -131,7 +137,12 @@ export const createBackup = createAsyncThunk<
"transferId" in file.payload
) {
featureToTransferId[feature] = file.payload.transferId
dispatch(setBackupProcessFileStatus({ feature, status: "DONE" }))
dispatch(
setBackupProcessFileStatus({
feature,
status: BackupProcessFileStatus.Done,
})
)
} else if (!aborted) {
console.log("Error while downloading file")
await clearTransfers()
Expand All @@ -142,7 +153,7 @@ export const createBackup = createAsyncThunk<
if (aborted) {
return rejectWithValue(undefined)
}
dispatch(setBackupProcessStatus("SAVE_FILE"))
dispatch(setBackupProcessStatus(BackupProcessStatus.SaveFile))
const saveBackupFileResponse = await saveBackupFileRequest(
featureToTransferId,
deviceId,
Expand Down
41 changes: 14 additions & 27 deletions libs/generic-view/store/src/lib/backup/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ import { refreshBackupList } from "./refresh-backup-list.action"
import { RestoreMetadata } from "device/models"
import { loadBackupMetadata } from "./load-backup-metadata.action"
import { restoreBackup } from "./restore-backup.action"
import {
BackupProcessFileStatus,
BackupProcessStatus,
RestoreProcessStatus,
} from "./backup.types"

export interface Backup {
fileName: string
date: Date
serialNumber: string
}

export type BackupProcessStatus =
| "PRE_BACKUP"
| "FILES_TRANSFER"
| "SAVE_FILE"
| "DONE"
| "FAILED"

export type BackupProcessFileStatus = "PENDING" | "IN_PROGRESS" | "DONE"

export interface BackupProcess {
status: BackupProcessStatus
featureFilesTransfer: Record<
Expand All @@ -42,15 +38,6 @@ export interface BackupProcess {
>
}

export type RestoreProcessStatus =
| "PASSWORD_NOT_REQUIRED"
| "PASSWORD_REQUIRED"
| "PRE_RESTORE"
| "FILES_TRANSFER"
| "RESTORING"
| "DONE"
| "FAILED"

export interface RestoreProcess {
status: RestoreProcessStatus
metadata?: RestoreMetadata
Expand Down Expand Up @@ -93,20 +80,20 @@ export const genericBackupsReducer = createReducer(initialState, (builder) => {
})
builder.addCase(createBackup.rejected, (state, action) => {
if (state.backupProcess) {
state.backupProcess.status = "FAILED"
state.backupProcess.status = BackupProcessStatus.Failed
} else {
state.backupProcess = {
status: "FAILED",
status: BackupProcessStatus.Failed,
featureFilesTransfer: {},
}
}
})
builder.addCase(createBackup.fulfilled, (state, action) => {
if (state.backupProcess) {
state.backupProcess.status = "DONE"
state.backupProcess.status = BackupProcessStatus.Done
} else {
state.backupProcess = {
status: "DONE",
status: BackupProcessStatus.Done,
featureFilesTransfer: {},
}
}
Expand All @@ -120,8 +107,8 @@ export const genericBackupsReducer = createReducer(initialState, (builder) => {
builder.addCase(loadBackupMetadata.fulfilled, (state, action) => {
state.restoreProcess = {
status: action.payload.restoreMetadata.header.password
? "PASSWORD_REQUIRED"
: "PASSWORD_NOT_REQUIRED",
? RestoreProcessStatus.PasswordRequired
: RestoreProcessStatus.PasswordNotRequired,
metadata: action.payload.restoreMetadata,
restoreFileId: action.payload.restoreFileId,
}
Expand All @@ -131,18 +118,18 @@ export const genericBackupsReducer = createReducer(initialState, (builder) => {
})
builder.addCase(loadBackupMetadata.rejected, (state, action) => {
state.restoreProcess = {
status: "FAILED",
status: RestoreProcessStatus.Failed,
}
})
builder.addCase(restoreBackup.pending, (state, action) => {
state.restoreProcess = {
...state.restoreProcess,
status: "PRE_RESTORE",
status: RestoreProcessStatus.PreRestore,
}
})
builder.addCase(restoreBackup.rejected, (state, action) => {
state.restoreProcess = {
status: "FAILED",
status: RestoreProcessStatus.Failed,
}
})
builder.addCase(setRestoreProcessStatus, (state, action) => {
Expand Down
Loading

0 comments on commit a009946

Please sign in to comment.