mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 13:37:09 +00:00
fix(bundler): replace empty RPM release value with 1 (#13909)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
parent
9c938be452
commit
bc6b125b24
5
.changes/fix-bundler-rpm-release-default.md
Normal file
5
.changes/fix-bundler-rpm-release-default.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
tauri-bundler: "patch:bug"
|
||||
---
|
||||
|
||||
The bundler now falls back to `1` for the release in case an empty string was provided instead of using `-.` in the file name.
|
||||
@ -21,7 +21,10 @@ use super::freedesktop;
|
||||
pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
|
||||
let product_name = settings.product_name();
|
||||
let version = settings.version_string();
|
||||
let release = settings.rpm().release.as_str();
|
||||
let release = match settings.rpm().release.as_str() {
|
||||
"" => "1", // Considered the default. If left empty, you get file with "-.".
|
||||
v => v,
|
||||
};
|
||||
let epoch = settings.rpm().epoch;
|
||||
let arch = match settings.binary_arch() {
|
||||
Arch::X86_64 => "x86_64",
|
||||
@ -234,6 +237,5 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
|
||||
|
||||
let mut f = fs::File::create(&package_path)?;
|
||||
pkg.write(&mut f)?;
|
||||
|
||||
Ok(vec![package_path])
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user