diff --git a/Changes.md b/Changes.md index 5b2d0ed..b0d504f 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,8 @@ +## 0.2.5 + +- When looking for macOS assets, `ubi` will now match against `macosx` in asset names, not just + `macos` and `osx`. Implemented by @kattouf (Vasiliy Kattouf). GH #80. + ## 0.2.4 - 2024-11-24 - `ubi` will now look for just "mac" or "Mac" in a filename when running on macOS. Previously, `ubi` diff --git a/ubi/src/os.rs b/ubi/src/os.rs index 12d0d06..640adf6 100644 --- a/ubi/src/os.rs +++ b/ubi/src/os.rs @@ -19,7 +19,7 @@ pub(crate) fn linux_re() -> &'static Lazy { } pub(crate) fn macos_re() -> &'static Lazy { - regex!(r"(?i:(?:\b|_)(?:darwin|mac(?:os)?|osx)(?:\b|_))") + regex!(r"(?i:(?:\b|_)(?:darwin|mac(?:osx?)?|osx)(?:\b|_))") } pub(crate) fn netbsd_re() -> &'static Lazy { diff --git a/ubi/src/picker.rs b/ubi/src/picker.rs index 8bcb295..c4214fd 100644 --- a/ubi/src/picker.rs +++ b/ubi/src/picker.rs @@ -446,6 +446,13 @@ mod test { 1 ; "aarch64-apple-darwin - pick asset with 'mac' in the name" )] + #[test_case( + "aarch64-apple-darwin", + &["project-Linux-x86-64.tar.gz", "project-Macosx-x86-64.tar.gz"], + None, + 1 ; + "aarch64-apple-darwin - pick asset with 'macosx' in the name" + )] #[test_case( "aarch64-apple-darwin", &["project-Macos-x86-64.tar.gz", "project-Macos-aarch64.tar.gz"],