Skip to content

Commit

Permalink
Merge pull request #376 from stanislav-tkach/3-8-1-release
Browse files Browse the repository at this point in the history
Release the 3.8.1 version
  • Loading branch information
stanislav-tkach authored Mar 17, 2024
2 parents 452c3bc + f63ff19 commit 773d319
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 27 deletions.
13 changes: 12 additions & 1 deletion 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]

- Build on FreeSBD has been fixed. (#372)

- Build on Illumos has been fixed. (#373)

- Build on NetBSD has been fixed. (#374)

- Few more regressions introduced in the `3.8.0` release were (hopefully) fixed.

## [3.8.1] (2024-03-17)

## [3.8.0] (2024-03-12)

- The `windows-sys` crate instead of `winapi` is now used internally. (#341)
Expand Down Expand Up @@ -317,7 +327,8 @@ All notable changes to this project will be documented in this file.

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.8.0...HEAD
[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.8.1...HEAD
[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
Expand Down
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.0", default-features = false, path = "../os_info" }
os_info = { version = "3.8.1", default-features = false, path = "../os_info" }
log.workspace = true
env_logger = "0.11"
clap = { version = "4", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion 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.0"
version = "3.8.1"
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
4 changes: 2 additions & 2 deletions os_info/src/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ fn get_version() -> Option<String> {
}

fn get_os() -> Type {
match uname("-o") {
match uname("-o").as_deref() {
Some("AIX") => Type::AIX,
None => Type::Unknown,
_ => Type::Unknown,
}
}

Expand Down
2 changes: 1 addition & 1 deletion os_info/src/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{bitness, uname::uname, Bitness, Info, Type, Version};
pub fn current_platform() -> Info {
trace!("dragonfly::current_platform is called");

let version = uname()
let version = uname("-r")
.map(Version::from_string)
.unwrap_or_else(|| Version::Unknown);

Expand Down
11 changes: 3 additions & 8 deletions os_info/src/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ pub fn current_platform() -> Info {
}

fn get_os() -> Type {
let os = match uname("-s") {
Some(o) => o,
None => return Type::Unknown,
};

match os.as_str() {
match uname("-s").as_deref() {
"MidnightBSD" => Type::MidnightBSD,
"FreeBSD" => {
let check_hardening = match Command::new("/sbin/sysctl")
Expand All @@ -47,8 +42,8 @@ fn get_os() -> Type {
Ok(_) => Type::FreeBSD,
Err(_) => Type::FreeBSD,
}
},
_ => Type::Unknown
}
_ => Type::Unknown,
}
}

Expand Down
15 changes: 3 additions & 12 deletions os_info/src/illumos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{bitness, uname::uname, Info, Type, Version};
pub fn current_platform() -> Info {
trace!("illumos::current_platform is called");

let version = get_version()
let version = uname("-v")
.map(Version::from_string)
.unwrap_or_else(|| Version::Unknown);

Expand All @@ -23,19 +23,10 @@ pub fn current_platform() -> Info {
info
}

fn get_version() -> Option<String> {
uname("-v")
}

fn get_os() -> Type {
let os = match uname("-o") {
Some(o) => o,
None => return Type::Unknown,
};

match os.as_str() {
match uname("-o").as_deref() {
"illumos" => Type::Illumos,
_ => Type::Unknown
_ => Type::Unknown,
}
}

Expand Down
2 changes: 1 addition & 1 deletion os_info/src/openbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{architecture, bitness, uname::uname, Info, Type, Version};
pub fn current_platform() -> Info {
trace!("openbsd::current_platform is called");

let version = uname()
let version = uname("-r")
.map(Version::from_string)
.unwrap_or_else(|| Version::Unknown);

Expand Down

0 comments on commit 773d319

Please sign in to comment.