File tree Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Expand file tree Collapse file tree 5 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ path = "src/driver.rs"
23
23
[dependencies ]
24
24
clippy_lints = { path = " clippy_lints" }
25
25
semver = " 1.0"
26
- rustc_tools_util = { version = " 0.2.1 " , path = " ./rustc_tools_util " }
26
+ rustc_tools_util = " 0.3.0 "
27
27
tempfile = { version = " 3.2" , optional = true }
28
28
termize = " 0.1"
29
29
@@ -56,7 +56,7 @@ tokio = { version = "1", features = ["io-util"] }
56
56
rustc-semver = " 1.1"
57
57
58
58
[build-dependencies ]
59
- rustc_tools_util = { version = " 0.2.1 " , path = " ./rustc_tools_util " }
59
+ rustc_tools_util = " 0.3.0 "
60
60
61
61
[features ]
62
62
deny-warnings = [" clippy_lints/deny-warnings" ]
Original file line number Diff line number Diff line change
1
+ # Changelog
2
+
3
+ ## Version 0.3.0
4
+
5
+ * Added ` setup_version_info!(); ` macro for automated scripts.
6
+ * ` get_version_info!() ` no longer requires the user to import ` rustc_tools_util::VersionInfo ` and ` std::env `
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " rustc_tools_util"
3
- version = " 0.2.1 "
3
+ version = " 0.3.0 "
4
4
description = " small helper to generate version information for git packages"
5
5
repository = " https://github.com/rust-lang/rust-clippy"
6
6
readme = " README.md"
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ build = "build.rs"
13
13
List rustc_tools_util as regular AND build dependency.
14
14
```` toml
15
15
[dependencies ]
16
- rustc_tools_util = " 0.2.1 "
16
+ rustc_tools_util = " 0.3.0 "
17
17
18
18
[build-dependencies ]
19
- rustc_tools_util = " 0.2.1 "
19
+ rustc_tools_util = " 0.3.0 "
20
20
````
21
21
22
22
In ` build.rs ` , generate the data in your ` main() `
@@ -44,6 +44,9 @@ This gives the following output in clippy:
44
44
This project is part of the rust-lang/rust-clippy repository. The source code
45
45
can be found under ` ./rustc_tools_util/ ` .
46
46
47
+ The changelog for ` rustc_tools_util ` is available under:
48
+ [ ` rustc_tools_util/CHANGELOG.md ` ] ( https://github.com/rust-lang/rust-clippy/blob/master/rustc_tools_util/CHANGELOG.md )
49
+
47
50
## License
48
51
49
52
Copyright 2014-2022 The Rust Project Developers
Original file line number Diff line number Diff line change 1
1
#![ cfg_attr( feature = "deny-warnings" , deny( warnings) ) ]
2
2
3
- use std:: env;
4
-
5
3
/// This macro creates the version string during compilation from the
6
4
/// current environment
7
5
#[ macro_export]
@@ -121,7 +119,7 @@ pub fn get_commit_date() -> Option<String> {
121
119
122
120
#[ must_use]
123
121
pub fn get_channel ( ) -> String {
124
- match env:: var ( "CFG_RELEASE_CHANNEL" ) {
122
+ match std :: env:: var ( "CFG_RELEASE_CHANNEL" ) {
125
123
Ok ( channel) => channel,
126
124
Err ( _) => {
127
125
// if that failed, try to ask rustc -V, do some parsing and find out
@@ -167,7 +165,7 @@ mod test {
167
165
#[ test]
168
166
fn test_display_local ( ) {
169
167
let vi = get_version_info ! ( ) ;
170
- assert_eq ! ( vi. to_string( ) , "rustc_tools_util 0.2.1 " ) ;
168
+ assert_eq ! ( vi. to_string( ) , "rustc_tools_util 0.3.0 " ) ;
171
169
}
172
170
173
171
#[ test]
You can’t perform that action at this time.
0 commit comments