Skip to content

Commit

Permalink
Merge pull request stanislav-tkach#344 from stanislav-tkach/release-3…
Browse files Browse the repository at this point in the history
…-7-0

Release the 3.7.0 version
  • Loading branch information
stanislav-tkach committed Mar 20, 2023
2 parents 5fbb59c + 4601e95 commit 755ae48
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 14 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [3.7.0] (2023-03-20)

- Information about a processor's architecture has been added. (#336)

- Mabox Linux support has been added. (#338)

- Alpaquita Linux support has been added. (#340)

- Artix Linux support has been added. (#342)

## [3.6.0] (2023-01-30)

- OpenCloudOS support has been added. (#328)
Expand Down Expand Up @@ -281,7 +291,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.6.0...HEAD
[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.7.0...HEAD
[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
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Expand Up @@ -18,7 +18,7 @@ name = "os_info"
path = "src/main.rs"

[dependencies]
os_info = { version = "3.6.0", default-features = false, path = "../os_info" }
os_info = { version = "3.7.0", default-features = false, path = "../os_info" }
log = "0.4.5"
env_logger = "0.10"
clap = { version = "4", features = ["derive"] }
Expand Down
3 changes: 3 additions & 0 deletions cspell-dictionary.txt
@@ -1,5 +1,6 @@
aarch64
almalinux
alpaquita
antergos
aosc
archarm
Expand All @@ -22,11 +23,13 @@ illumos
isainfo
libntdll
linuxmint
mabox
macos
mageia
manjaro
midnightbsd
msvc
musl
netbsd
nixos
openbsd
Expand Down
2 changes: 1 addition & 1 deletion os_info/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "os_info"
version = "3.6.0"
version = "3.7.0"
authors = ["Jan Schulte <hello@unexpected-co.de>", "Stanislav Tkach <stanislav.tkach@gmail.com>"]
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/architecture.rs
Expand Up @@ -2,7 +2,7 @@ use std::process::Command;

use log::error;

pub fn architecture() -> Option<String> {
pub fn get() -> Option<String> {
Command::new("uname")
.arg("-m")
.output()
Expand All @@ -26,7 +26,7 @@ mod tests {

#[test]
fn uname_nonempty() {
let val = architecture().expect("uname failed");
let val = get().expect("uname failed");
assert!(!val.is_empty());
}
}
2 changes: 1 addition & 1 deletion os_info/src/info.rs
Expand Up @@ -31,7 +31,7 @@ pub struct Info {
/// Operating system architecture in terms of how many bits compose the basic values it can deal
/// with. See `Bitness` for details.
pub(crate) bitness: Bitness,
// Processor architecture.
/// Processor architecture.
pub(crate) architecture: Option<String>,
}

Expand Down
8 changes: 7 additions & 1 deletion os_info/src/lib.rs
Expand Up @@ -7,7 +7,7 @@
missing_debug_implementations,
missing_docs,
unsafe_code,
rustdoc::missing_doc_code_examples
missing_doc_code_examples
)]

#[cfg(target_os = "android")]
Expand Down Expand Up @@ -70,6 +70,12 @@ mod imp;
#[path = "unknown/mod.rs"]
mod imp;

#[cfg(any(
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd"
))]
mod architecture;
mod bitness;
mod info;
Expand Down
2 changes: 1 addition & 1 deletion os_info/src/linux/mod.rs
Expand Up @@ -12,7 +12,7 @@ pub fn current_platform() -> Info {
.or_else(file_release::get)
.unwrap_or_else(|| Info::with_type(Type::Linux));
info.bitness = bitness::get();
info.architecture = architecture::architecture();
info.architecture = architecture::get();

trace!("Returning {:?}", info);
info
Expand Down
4 changes: 2 additions & 2 deletions os_info/src/macos/mod.rs
Expand Up @@ -2,7 +2,7 @@ use std::process::Command;

use log::{trace, warn};

use crate::{architecture::architecture, bitness, matcher::Matcher, Info, Type, Version};
use crate::{architecture, bitness, matcher::Matcher, Info, Type, Version};

pub fn current_platform() -> Info {
trace!("macos::current_platform is called");
Expand All @@ -11,7 +11,7 @@ pub fn current_platform() -> Info {
os_type: Type::Macos,
version: version(),
bitness: bitness::get(),
architecture: architecture(),
architecture: architecture::get(),
..Default::default()
};
trace!("Returning {:?}", info);
Expand Down
4 changes: 2 additions & 2 deletions os_info/src/netbsd/mod.rs
Expand Up @@ -2,7 +2,7 @@ use std::process::Command;

use log::{error, trace};

use crate::{architecture::architecture, bitness, uname::uname, Info, Type, Version};
use crate::{architecture, bitness, uname::uname, Info, Type, Version};

pub fn current_platform() -> Info {
trace!("netbsd::current_platform is called");
Expand All @@ -15,7 +15,7 @@ pub fn current_platform() -> Info {
os_type: Type::NetBSD,
version,
bitness: bitness::get(),
architecture: architecture::architecture(),
architecture: architecture::get(),
..Default::default()
};

Expand Down
4 changes: 2 additions & 2 deletions os_info/src/openbsd/mod.rs
Expand Up @@ -2,7 +2,7 @@ use std::process::Command;

use log::{error, trace};

use crate::{architecture::architecture, bitness, uname::uname, Info, Type, Version};
use crate::{architecture, bitness, uname::uname, Info, Type, Version};

pub fn current_platform() -> Info {
trace!("openbsd::current_platform is called");
Expand All @@ -15,7 +15,7 @@ pub fn current_platform() -> Info {
os_type: Type::OpenBSD,
version,
bitness: bitness::get(),
architecture: architecture::architecture(),
architecture: architecture::get(),
..Default::default()
};

Expand Down

0 comments on commit 755ae48

Please sign in to comment.