Skip to content

Commit 9ac5fe8

Browse files
kandrelczyklucasfernogLegend-MasterFabianLars
authored
feat(updater): support bundle-specific targets (#2624)
* fallback targets * linux test * linux ready * RPM installation * small error fix * fix windows build * windows tests * add aider files to .gitignore * get bundle type out of patched variable * windows tests * patch windows binary * format * fix bundler * remove local tauri dependency * remove print * rever Cargo.lock * move __TAURI_BUNDLE_TYPE to tauri::utils * get_current_bundle_type * update tauri * fix macos integration test * fix fallback logic Signed-off-by: Krzysztof Andrelczyk <[email protected]> * amend! fallback targets fallback targets * reformat * fix tests * reformat * bump tari versio * fix fallback logic * restore Cargo.lock * Bump tauri and add notes * Rename some staffs * move target logic * Refactor the target fallback to a function * Format and clippy * Keep target in `Update` since it's public * Keep updater/tests/app-updater/src/main.rs lf * Revert changes in tests/app-updater/src/main.rs * Clean up * changefile * Bump updater-js as well * update pub fn target docs * update pub fn target docs * Update plugins/updater/src/error.rs Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/updater/src/updater.rs Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/updater/src/updater.rs Co-authored-by: Fabian-Lars <[email protected]> * suggestios * add comment * restore error * Revert "Bump tauri and add notes" This reverts commit 0a495cc. * Revert "bump tari versio" This reverts commit 5b4c1c1. --------- Signed-off-by: Krzysztof Andrelczyk <[email protected]> Co-authored-by: Lucas Nogueira <[email protected]> Co-authored-by: Tony <[email protected]> Co-authored-by: Fabian-Lars <[email protected]>
1 parent c247410 commit 9ac5fe8

File tree

7 files changed

+337
-140
lines changed

7 files changed

+337
-140
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"updater": minor
3+
"updater-js": minor
4+
---
5+
6+
Updater plugin now supports all bundle types: Deb, Rpm and AppImage for Linux; NSiS, MSI for Windows.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ pids
5858
.idea
5959
debug.log
6060
TODO.md
61-
.aider*
61+
.aider.*

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/updater/src/error.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ pub enum Error {
3939
/// `reqwest` crate errors.
4040
#[error(transparent)]
4141
Reqwest(#[from] reqwest::Error),
42-
/// The platform was not found on the updater JSON response.
43-
#[error("the platform `{0}` was not found on the response `platforms` object")]
42+
/// The platform was not found in the updater JSON response.
43+
#[error("the platform `{0}` was not found in the response `platforms` object")]
4444
TargetNotFound(String),
45+
/// Neither the platform nor the fallback platform was found in the updater JSON response.
46+
#[error(
47+
"None of the fallback platforms `{0:?}` were found in the response `platforms` object"
48+
)]
49+
TargetsNotFound(Vec<String>),
4550
/// Download failed
4651
#[error("`{0}`")]
4752
Network(String),
@@ -69,6 +74,8 @@ pub enum Error {
6974
AuthenticationFailed,
7075
#[error("Failed to install .deb package")]
7176
DebInstallFailed,
77+
#[error("Failed to install package")]
78+
PackageInstallFailed,
7279
#[error("invalid updater binary format")]
7380
InvalidUpdaterFormat,
7481
#[error(transparent)]

0 commit comments

Comments
 (0)