Skip to content

Commit

Permalink
Release the 3.9.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-tkach committed Nov 30, 2024
1 parent 41436a3 commit a823192
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 15 deletions.
70 changes: 67 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [3.9.0] (2024-11-30)

- Nobara Linux support has been added. (#379)

- UOS support has been added. (#380)

- Fix `uname` usage on AIX. (#381)

- CachyOS support has been added. (#386)

## [3.8.2] (2024-03-22)

- Build on FreeSBD has been fixed once again. (#377)
Expand Down Expand Up @@ -268,7 +278,7 @@ All notable changes to this project will be documented in this file.

## [1.0.3] (2018-09-23)

- Fixed linker errors for 32-bit msvc builds. (#88)
- Fixed linker errors for 32-bit msvc builds. (#88)

## [1.0.2] (2018-09-05)

Expand Down Expand Up @@ -329,57 +339,111 @@ All notable changes to this project will be documented in this file.

## [0.1.0] (2017-10-03)

The first release containing only minor infrastructural changes and based on [os_type](https://github.com/schultyy/os_type).
The first release containing only minor infrastructural changes and based
on [os_type](https://github.com/schultyy/os_type).

[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.9.0...HEAD

[3.9.0]: https://github.com/stanislav-tkach/os_info/compare/v3.8.2...v3.9.0

[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.8.2...HEAD
[3.8.1]: https://github.com/stanislav-tkach/os_info/compare/v3.8.1...v3.8.2

[3.8.1]: https://github.com/stanislav-tkach/os_info/compare/v3.8.0...v3.8.1

[3.8.0]: https://github.com/stanislav-tkach/os_info/compare/v3.7.0...v3.8.0

[3.7.0]: https://github.com/stanislav-tkach/os_info/compare/v3.6.0...v3.7.0

[3.6.0]: https://github.com/stanislav-tkach/os_info/compare/v3.5.1...v3.6.0

[3.5.1]: https://github.com/stanislav-tkach/os_info/compare/v3.5.0...v3.5.1

[3.5.0]: https://github.com/stanislav-tkach/os_info/compare/v3.4.0...v3.5.0

[3.4.0]: https://github.com/stanislav-tkach/os_info/compare/v3.3.0...v3.4.0

[3.3.0]: https://github.com/stanislav-tkach/os_info/compare/v3.2.0...v3.3.0

[3.2.0]: https://github.com/stanislav-tkach/os_info/compare/v3.1.0...v3.2.0

[3.1.0]: https://github.com/stanislav-tkach/os_info/compare/v3.0.9...v3.1.0

[3.0.9]: https://github.com/stanislav-tkach/os_info/compare/v3.0.8...v3.0.9

[3.0.8]: https://github.com/stanislav-tkach/os_info/compare/v3.0.7...v3.0.8

[3.0.7]: https://github.com/stanislav-tkach/os_info/compare/v3.0.6...v3.0.7

[3.0.6]: https://github.com/stanislav-tkach/os_info/compare/v3.0.5...v3.0.6

[3.0.5]: https://github.com/stanislav-tkach/os_info/compare/v3.0.4...v3.0.5

[3.0.4]: https://github.com/stanislav-tkach/os_info/compare/v3.0.3...v3.0.4

[3.0.3]: https://github.com/stanislav-tkach/os_info/compare/v3.0.2...v3.0.3

[3.0.2]: https://github.com/stanislav-tkach/os_info/compare/v3.0.1...v3.0.2

[3.0.1]: https://github.com/stanislav-tkach/os_info/compare/v3.0...v3.0.1

[3.0.0]: https://github.com/stanislav-tkach/os_info/compare/v2.0.8...v3.0

[2.0.8]: https://github.com/stanislav-tkach/os_info/compare/v2.0.7...v2.0.8

[2.0.7]: https://github.com/stanislav-tkach/os_info/compare/v2.0.6...v2.0.7

[2.0.6]: https://github.com/stanislav-tkach/os_info/compare/2.0.5...v2.0.6

[2.0.5]: https://github.com/stanislav-tkach/os_info/compare/2.0.4...2.0.5

[2.0.4]: https://github.com/stanislav-tkach/os_info/compare/v2.0.3...2.0.4

[2.0.3]: https://github.com/stanislav-tkach/os_info/compare/v2.0.2...v2.0.3

[2.0.2]: https://github.com/stanislav-tkach/os_info/compare/v2.0.1...v2.0.2

[2.0.1]: https://github.com/stanislav-tkach/os_info/compare/v2.0...v2.0.1

[2.0.0]: https://github.com/stanislav-tkach/os_info/compare/v1.3.3...v2.0

[1.3.3]: https://github.com/stanislav-tkach/os_info/compare/v1.3.2...v1.3.3

[1.3.2]: https://github.com/stanislav-tkach/os_info/compare/v1.3.1...v1.3.2

[1.3.1]: https://github.com/stanislav-tkach/os_info/compare/v1.3...v1.3.1

[1.3.0]: https://github.com/stanislav-tkach/os_info/compare/v1.2...v1.3

[1.2.0]: https://github.com/stanislav-tkach/os_info/compare/v1.1.3...v1.2

[1.1.3]: https://github.com/stanislav-tkach/os_info/compare/v1.1.2...v1.1.3

[1.1.2]: https://github.com/stanislav-tkach/os_info/compare/v1.1.1...v1.1.2

[1.1.1]: https://github.com/stanislav-tkach/os_info/compare/v1.1...v1.1.1

[1.1.0]: https://github.com/stanislav-tkach/os_info/compare/v1.0.3...v1.1

[1.0.3]: https://github.com/stanislav-tkach/os_info/compare/v1.0.2...v1.0.3

[1.0.2]: https://github.com/stanislav-tkach/os_info/compare/v1.0.1...v1.0.2

[1.0.1]: https://github.com/stanislav-tkach/os_info/compare/v1.0.1...v1.0.2

[1.0.0]: https://github.com/stanislav-tkach/os_info/compare/v0.7.0...v1.0

[0.7.0]: https://github.com/stanislav-tkach/os_info/compare/v0.6.0...v0.7.0

[0.6.0]: https://github.com/stanislav-tkach/os_info/compare/v0.5.0...v0.6.0

[0.5.0]: https://github.com/stanislav-tkach/os_info/compare/v0.4.0...v0.5.0

[0.4.0]: https://github.com/stanislav-tkach/os_info/compare/v0.3.0...v0.4.0

[0.3.0]: https://github.com/stanislav-tkach/os_info/compare/v0.2.0...v0.3.0

[0.2.0]: https://github.com/stanislav-tkach/os_info/compare/v.0.1.1...v0.2.0

[0.1.1]: https://github.com/stanislav-tkach/os_info/compare/v0.1.0...v.0.1.1

[0.1.0]: https://github.com/stanislav-tkach/os_info/tree/v0.1.0
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Right now, the following operating system types can be returned:
- Android
- Arch Linux
- Artix Linux
- CachyOS
- CentOS
- Debian
- DragonFly BSD
Expand All @@ -108,6 +109,7 @@ Right now, the following operating system types can be returned:
- Mint
- NetBSD
- NixOS
- Nobara Linux
- OpenBSD
- OpenCloudOS
- openEuler (EulerOS)
Expand All @@ -134,4 +136,5 @@ If you need support for more OS types, I am looking forward to your Pull Request
`os_info` is licensed under the MIT license. See [LICENSE] for the details.

[lsb_release]: http://refspecs.linuxbase.org/LSB_2.0.1/LSB-PDA/LSB-PDA/lsbrelease.html

[LICENSE]: https://github.com/stanislav-tkach/os_info/blob/master/LICENSE
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "os_info"
path = "src/main.rs"

[dependencies]
os_info = { version = "3.8.2", default-features = false, path = "../os_info" }
os_info = { version = "3.9.0", default-features = false, path = "../os_info" }
log.workspace = true
env_logger = "0.11"
clap = { version = "4", features = ["derive"] }
Expand Down
5 changes: 3 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
"Unicode-3.0",
]
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
Expand Down Expand Up @@ -123,8 +124,8 @@ exceptions = [
# and the crate will be checked normally, which may produce warnings or errors
# depending on the rest of your configuration
#license-files = [
# Each entry is a crate relative path, and the (opaque) hash of its contents
#{ path = "LICENSE", hash = 0xbd0eed23 }
# Each entry is a crate relative path, and the (opaque) hash of its contents
#{ path = "LICENSE", hash = 0xbd0eed23 }
#]

[licenses.private]
Expand Down
4 changes: 2 additions & 2 deletions os_info/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "os_info"
version = "3.8.2"
version = "3.9.0"
authors = ["Jan Schulte <[email protected]>", "Stanislav Tkach <[email protected]>"]
description = "Detect the operating system type and version."
documentation = "https://docs.rs/os_info"
Expand Down Expand Up @@ -29,7 +29,7 @@ windows-sys = { version = "0.52", features = [
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_UI_WindowsAndMessaging",
]}
] }

[dev-dependencies]
pretty_assertions = "1"
Expand Down
5 changes: 2 additions & 3 deletions os_info/src/linux/lsb_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct LsbRelease {
fn retrieve() -> Option<LsbRelease> {
match Command::new("lsb_release").arg("-a").output() {
Ok(output) => {
trace!("lsb_release command returned {:?}", output); //日志信息
trace!("lsb_release command returned {:?}", output);

Check warning on line 70 in os_info/src/linux/lsb_release.rs

View check run for this annotation

Codecov / codecov/patch

os_info/src/linux/lsb_release.rs#L70

Added line #L70 was not covered by tests
Some(parse(&String::from_utf8_lossy(&output.stdout)))
}
Err(e) => {
Expand All @@ -77,7 +77,6 @@ fn retrieve() -> Option<LsbRelease> {
}
}

// 解析
fn parse(output: &str) -> LsbRelease {
trace!("Trying to parse {:?}", output);

Expand Down Expand Up @@ -360,7 +359,7 @@ mod tests {

#[test]
fn cachyos() {
let parse_results = parse(&cachyos_file());
let parse_results = parse(cachyos_file());
assert_eq!(parse_results.distribution, Some("cachyos".to_string()));
assert_eq!(parse_results.version, Some("rolling".to_string()));
}
Expand Down
8 changes: 4 additions & 4 deletions os_info/src/os_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ pub enum Type {
NixOS,
/// Nobara (<https://nobaraproject.org/>).
Nobara,
/// Uos (<https://www.chinauos.com/>).
Uos,
/// OpenBSD (<https://en.wikipedia.org/wiki/OpenBSD>).
OpenBSD,
/// OpenCloudOS (<https://www.opencloudos.org>).
Expand Down Expand Up @@ -100,6 +98,8 @@ pub enum Type {
Ubuntu,
/// Ultramarine (<https://ultramarine-linux.org/>).
Ultramarine,
/// Uos (<https://www.chinauos.com/>).
Uos,
/// Void Linux (<https://en.wikipedia.org/wiki/Void_Linux>).
Void,
/// Unknown operating system.
Expand Down Expand Up @@ -133,7 +133,6 @@ impl Display for Type {
Type::MidnightBSD => write!(f, "Midnight BSD"),
Type::Mint => write!(f, "Linux Mint"),
Type::Nobara => write!(f, "Nobara Linux"),
Type::Uos => write!(f, "Uos"),
Type::openEuler => write!(f, "EulerOS"),
Type::OracleLinux => write!(f, "Oracle Linux"),
Type::Pop => write!(f, "Pop!_OS"),
Expand All @@ -143,6 +142,7 @@ impl Display for Type {
Type::RockyLinux => write!(f, "Rocky Linux"),
Type::SUSE => write!(f, "SUSE Linux Enterprise Server"),
Type::Ultramarine => write!(f, "Ultramarine Linux"),
Type::Uos => write!(f, "UOS"),
Type::Void => write!(f, "Void Linux"),
_ => write!(f, "{self:?}"),
}
Expand Down Expand Up @@ -192,7 +192,6 @@ mod tests {
(Type::NetBSD, "NetBSD"),
(Type::NixOS, "NixOS"),
(Type::Nobara, "Nobara Linux"),
(Type::Uos, "Uos"),
(Type::OpenCloudOS, "OpenCloudOS"),
(Type::OpenBSD, "OpenBSD"),
(Type::openEuler, "EulerOS"),
Expand All @@ -209,6 +208,7 @@ mod tests {
(Type::Ubuntu, "Ubuntu"),
(Type::Ultramarine, "Ultramarine Linux"),
(Type::Unknown, "Unknown"),
(Type::Uos, "UOS"),
(Type::Void, "Void Linux"),
(Type::Windows, "Windows"),
];
Expand Down

0 comments on commit a823192

Please sign in to comment.