File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -146,9 +146,13 @@ fn gen_license_urls(ArgsGenLicenseUrls {}: ArgsGenLicenseUrls) -> eyre::Result<(
146
146
} )
147
147
. collect :: < eyre:: Result < _ > > ( ) ?;
148
148
149
- for url in reorder ( urls, & root_package. manifest_path ) ? {
150
- println ! ( "{url}" ) ;
151
- }
149
+ println ! (
150
+ "{}" ,
151
+ Template {
152
+ crate_licenses: reorder( urls, & root_package. manifest_path) ?. collect( ) ,
153
+ }
154
+ . render( ) ?,
155
+ ) ;
152
156
return Ok ( ( ) ) ;
153
157
154
158
fn read_git_sha1 ( manifest_dir : & Utf8Path ) -> eyre:: Result < String > {
@@ -167,6 +171,12 @@ fn gen_license_urls(ArgsGenLicenseUrls {}: ArgsGenLicenseUrls) -> eyre::Result<(
167
171
sha1 : String ,
168
172
}
169
173
}
174
+
175
+ #[ derive( askama:: Template ) ]
176
+ #[ template( path = "./license-url.txt" ) ]
177
+ struct Template {
178
+ crate_licenses : Vec < String > ,
179
+ }
170
180
}
171
181
172
182
fn normal_crates_io_deps (
Original file line number Diff line number Diff line change
1
+ https://www.rust-lang.org/ja/policies/licenses
2
+
3
+ {{ crate_licenses|join("\n") }}
You can’t perform that action at this time.
0 commit comments