Skip to content

Commit

Permalink
Add repository field to license (#30)
Browse files Browse the repository at this point in the history
* Add repository field to license

* Fix for older THIRDPARTY files

---------

Co-authored-by: to <troppmann@efe-gmbh.de>
Co-authored-by: TomTroppmann <74185941+TomTroppmann@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 17, 2024
1 parent c110e71 commit 98efdb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/finalized_license.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ pub struct FinalizedLicense {
pub package_name: String,
/// The version of the package this license is for.
pub package_version: String,
/// The full license from the Cargo.toml
/// The url of the repository from the Cargo.toml.
#[serde(default)]
pub repository: String,
/// The full license from the Cargo.toml.
pub license: String,
/// The licenses and their associated text
/// The licenses and their associated text.
pub licenses: Vec<LicenseAndText>,
}

Expand All @@ -44,6 +47,7 @@ impl FinalizedLicense {
Self {
package_name: package.name.clone(),
package_version: package.version.to_string(),
repository: package.repository.to_owned().unwrap_or_default(),
license: package
.license
.to_owned()
Expand Down

0 comments on commit 98efdb7

Please sign in to comment.