From a150caf54ac1fed1bf76fc34d1f73381d190e564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Esp=C3=ADn?= Date: Mon, 9 Oct 2023 16:24:18 +0200 Subject: [PATCH] hotfix: Migrate remaining chrysalis profiles (#7555) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: error WIP * fix: Attempt * fix: Attempt 2 * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * fix: Fixes * clean up * fmt and lint * clean up * clean up * clean up * tweak * fix: corrupted profiles * fix: persistedProfileMigrationToV11 * feat: Fixed `no chrysalis data to migrate` (#7565) * fix: Fixed 'migration failed no chrysalis data to migrate' * update comment * tweak * feat: add missing onSuccess * fix: success condition --------- Co-authored-by: Begoña Alvarez * feat: rename old profile folder names from name to id * fix: add full profile path --------- Co-authored-by: cpl121 Co-authored-by: Begoña Alvarez --- .github/workflows/build-desktop.yml | 12 +++---- packages/desktop/App.svelte | 12 ++++++- .../migrateStrongholdFromActiveProfile.ts | 10 +++++- .../checkAndMigrateChrysalisProfiles.ts | 13 +++++-- .../profiles/checkAndMigrateProfiles.ts | 29 ++++++++++----- .../core/profile/actions/profiles/index.ts | 1 + .../profiles/migrateDbChrysalisToStardust.ts | 36 +++++++++++++------ .../profiles/renameOldProfileFoldersToId.ts | 25 +++++++++++++ ...fault-persisted-profile-object.constant.ts | 3 +- .../stores/current-profile-version.store.ts | 2 +- 10 files changed, 112 insertions(+), 31 deletions(-) create mode 100644 packages/shared/lib/core/profile/actions/profiles/renameOldProfileFoldersToId.ts diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 4b2773821b8..0e95c24d096 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -140,24 +140,24 @@ jobs: if: matrix.os == 'ubuntu-20.04' - name: Sign AppImage (Linux) - run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key contact@iota.org firefly-desktop*.AppImage + run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key contact@iota.org firefly-*.AppImage working-directory: packages/desktop/out env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} if: matrix.os == 'ubuntu-20.04' - name: Compute checksums (Linux) - run: for i in `ls | grep 'firefly-desktop*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done + run: for i in `ls | grep 'firefly-*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done working-directory: packages/desktop/out if: matrix.os == 'ubuntu-20.04' - name: Compute checksums (macOS) - run: for i in `ls | grep 'firefly-desktop*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done + run: for i in `ls | grep 'firefly-*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done working-directory: packages/desktop/out if: matrix.os == 'macos-11' - name: Compute checksums (Windows) - run: Get-ChildItem "." -Filter firefly-desktop* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') } + run: Get-ChildItem "." -Filter firefly-* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') } working-directory: packages/desktop/out if: matrix.os == 'windows-2019' @@ -166,5 +166,5 @@ jobs: with: name: firefly-desktop-${{ matrix.os }} path: | - packages/desktop/out/firefly-desktop* - packages/desktop/out/shimmer* + packages/desktop/out/firefly-* + packages/desktop/out/latest* diff --git a/packages/desktop/App.svelte b/packages/desktop/App.svelte index 521611d8da0..ad97b63d180 100644 --- a/packages/desktop/App.svelte +++ b/packages/desktop/App.svelte @@ -1,7 +1,13 @@