-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: include package URL in package_info (#1917)
Requires upgrade to the 1.0.0 release of rules_license, which is more appropriate than a pre-release anyway. Follow-up to #1852 Note that I'm still unable to gather the resulting data from an end-user point of view using the aspects provided by rules_license. Will look for some help on Slack to see if there's still missing plumbing. --------- Co-authored-by: Fabian Meumertzheim <[email protected]>
- Loading branch information
Showing
5 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ def _test_package_info_impl(env, target): | |
subject.package_name().equals("github.com/fmeum/dep_on_gazelle") | ||
subject.package_version().equals("1.0.0") | ||
subject.package_url().equals("https://github.com/fmeum/dep_on_gazelle") | ||
subject.purl().equals("pkg:golang/github.com/fmeum/[email protected]") | ||
|
||
def _package_info_aspect_impl(_, ctx): | ||
if hasattr(ctx.rule.attr, "applicable_licenses"): | ||
|
@@ -51,6 +52,7 @@ _PackageInfoSubjectFactory = struct( | |
"package_name": subjects.str, | ||
"package_version": subjects.str, | ||
"package_url": subjects.str, | ||
"purl": subjects.str, | ||
}, | ||
), | ||
) | ||
|