File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,29 @@ pub fn render(
20
20
) -> Result < TokenStream > {
21
21
let mut out = TokenStream :: new ( ) ;
22
22
23
+ let commit_info = {
24
+ let tmp = include_str ! ( concat!( env!( "OUT_DIR" ) , "/commit-info.txt" ) ) ;
25
+
26
+ if tmp. is_empty ( ) {
27
+ " (unknown commit)"
28
+ } else {
29
+ tmp
30
+ }
31
+ } ;
32
+
23
33
let doc = format ! (
24
34
"Peripheral access API for {0} microcontrollers \
25
- (generated using svd2rust v{1})\n \n \
26
- You can find an overview of the API [here].\n \n \
27
- [here]: https://docs.rs/svd2rust/{1}/svd2rust/#peripheral-api",
35
+ (generated using svd2rust v{1}{2})\n \n \
36
+ You can find an overview of the API as of release v{1} [here].\n \n \
37
+ Docs containing API features to be included in the [next] \
38
+ release can be generated by cloning the svd2rust [repository], \
39
+ checking out the above commit, and running `cargo doc`.\n \n \
40
+ [here]: https://docs.rs/svd2rust/{1}/svd2rust/#peripheral-api\n \
41
+ [next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n \
42
+ [repository]: https://github.com/rust-embedded/svd2rust",
28
43
d. name. to_uppercase( ) ,
29
- env!( "CARGO_PKG_VERSION" )
44
+ env!( "CARGO_PKG_VERSION" ) ,
45
+ commit_info
30
46
) ;
31
47
32
48
if target == Target :: Msp430 {
You can’t perform that action at this time.
0 commit comments