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<(
146146 } )
147147 . collect :: < eyre:: Result < _ > > ( ) ?;
148148
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+ ) ;
152156 return Ok ( ( ) ) ;
153157
154158 fn read_git_sha1 ( manifest_dir : & Utf8Path ) -> eyre:: Result < String > {
@@ -167,6 +171,12 @@ fn gen_license_urls(ArgsGenLicenseUrls {}: ArgsGenLicenseUrls) -> eyre::Result<(
167171 sha1 : String ,
168172 }
169173 }
174+
175+ #[ derive( askama:: Template ) ]
176+ #[ template( path = "./license-url.txt" ) ]
177+ struct Template {
178+ crate_licenses : Vec < String > ,
179+ }
170180}
171181
172182fn 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