Skip to content

Commit 755ae48

Browse files
Merge pull request #344 from stanislav-tkach/release-3-7-0
Release the 3.7.0 version
2 parents 5fbb59c + 4601e95 commit 755ae48

File tree

11 files changed

+34
-14
lines changed

11 files changed

+34
-14
lines changed

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [3.7.0] (2023-03-20)
8+
9+
- Information about a processor's architecture has been added. (#336)
10+
11+
- Mabox Linux support has been added. (#338)
12+
13+
- Alpaquita Linux support has been added. (#340)
14+
15+
- Artix Linux support has been added. (#342)
16+
717
## [3.6.0] (2023-01-30)
818

919
- OpenCloudOS support has been added. (#328)
@@ -281,7 +291,8 @@ All notable changes to this project will be documented in this file.
281291

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

284-
[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.6.0...HEAD
294+
[Unreleased]: https://github.com/stanislav-tkach/os_info/compare/v3.7.0...HEAD
295+
[3.7.0]: https://github.com/stanislav-tkach/os_info/compare/v3.6.0...v3.7.0
285296
[3.6.0]: https://github.com/stanislav-tkach/os_info/compare/v3.5.1...v3.6.0
286297
[3.5.1]: https://github.com/stanislav-tkach/os_info/compare/v3.5.0...v3.5.1
287298
[3.5.0]: https://github.com/stanislav-tkach/os_info/compare/v3.4.0...v3.5.0

cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ name = "os_info"
1818
path = "src/main.rs"
1919

2020
[dependencies]
21-
os_info = { version = "3.6.0", default-features = false, path = "../os_info" }
21+
os_info = { version = "3.7.0", default-features = false, path = "../os_info" }
2222
log = "0.4.5"
2323
env_logger = "0.10"
2424
clap = { version = "4", features = ["derive"] }

cspell-dictionary.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
aarch64
22
almalinux
3+
alpaquita
34
antergos
45
aosc
56
archarm
@@ -22,11 +23,13 @@ illumos
2223
isainfo
2324
libntdll
2425
linuxmint
26+
mabox
2527
macos
2628
mageia
2729
manjaro
2830
midnightbsd
2931
msvc
32+
musl
3033
netbsd
3134
nixos
3235
openbsd

os_info/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "os_info"
3-
version = "3.6.0"
3+
version = "3.7.0"
44
authors = ["Jan Schulte <[email protected]>", "Stanislav Tkach <[email protected]>"]
55
description = "Detect the operating system type and version."
66
documentation = "https://docs.rs/os_info"

os_info/src/architecture.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::Command;
22

33
use log::error;
44

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

2727
#[test]
2828
fn uname_nonempty() {
29-
let val = architecture().expect("uname failed");
29+
let val = get().expect("uname failed");
3030
assert!(!val.is_empty());
3131
}
3232
}

os_info/src/info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct Info {
3131
/// Operating system architecture in terms of how many bits compose the basic values it can deal
3232
/// with. See `Bitness` for details.
3333
pub(crate) bitness: Bitness,
34-
// Processor architecture.
34+
/// Processor architecture.
3535
pub(crate) architecture: Option<String>,
3636
}
3737

os_info/src/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
missing_debug_implementations,
88
missing_docs,
99
unsafe_code,
10-
rustdoc::missing_doc_code_examples
10+
missing_doc_code_examples
1111
)]
1212

1313
#[cfg(target_os = "android")]
@@ -70,6 +70,12 @@ mod imp;
7070
#[path = "unknown/mod.rs"]
7171
mod imp;
7272

73+
#[cfg(any(
74+
target_os = "linux",
75+
target_os = "macos",
76+
target_os = "netbsd",
77+
target_os = "openbsd"
78+
))]
7379
mod architecture;
7480
mod bitness;
7581
mod info;

os_info/src/linux/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn current_platform() -> Info {
1212
.or_else(file_release::get)
1313
.unwrap_or_else(|| Info::with_type(Type::Linux));
1414
info.bitness = bitness::get();
15-
info.architecture = architecture::architecture();
15+
info.architecture = architecture::get();
1616

1717
trace!("Returning {:?}", info);
1818
info

os_info/src/macos/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::Command;
22

33
use log::{trace, warn};
44

5-
use crate::{architecture::architecture, bitness, matcher::Matcher, Info, Type, Version};
5+
use crate::{architecture, bitness, matcher::Matcher, Info, Type, Version};
66

77
pub fn current_platform() -> Info {
88
trace!("macos::current_platform is called");
@@ -11,7 +11,7 @@ pub fn current_platform() -> Info {
1111
os_type: Type::Macos,
1212
version: version(),
1313
bitness: bitness::get(),
14-
architecture: architecture(),
14+
architecture: architecture::get(),
1515
..Default::default()
1616
};
1717
trace!("Returning {:?}", info);

os_info/src/netbsd/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::Command;
22

33
use log::{error, trace};
44

5-
use crate::{architecture::architecture, bitness, uname::uname, Info, Type, Version};
5+
use crate::{architecture, bitness, uname::uname, Info, Type, Version};
66

77
pub fn current_platform() -> Info {
88
trace!("netbsd::current_platform is called");
@@ -15,7 +15,7 @@ pub fn current_platform() -> Info {
1515
os_type: Type::NetBSD,
1616
version,
1717
bitness: bitness::get(),
18-
architecture: architecture::architecture(),
18+
architecture: architecture::get(),
1919
..Default::default()
2020
};
2121

os_info/src/openbsd/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::process::Command;
22

33
use log::{error, trace};
44

5-
use crate::{architecture::architecture, bitness, uname::uname, Info, Type, Version};
5+
use crate::{architecture, bitness, uname::uname, Info, Type, Version};
66

77
pub fn current_platform() -> Info {
88
trace!("openbsd::current_platform is called");
@@ -15,7 +15,7 @@ pub fn current_platform() -> Info {
1515
os_type: Type::OpenBSD,
1616
version,
1717
bitness: bitness::get(),
18-
architecture: architecture::architecture(),
18+
architecture: architecture::get(),
1919
..Default::default()
2020
};
2121

0 commit comments

Comments
 (0)