Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Aug 1, 2024
1 parent 1ab9722 commit 21fd0e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ def gazelle_dependencies(
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
)

_maybe(
http_archive,
name = "rules_license",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.8/rules_license-0.0.8.tar.gz",
"https://github.com/bazelbuild/rules_license/releases/download/0.0.8/rules_license-0.0.8.tar.gz",
],
sha256 = "241b06f3097fd186ff468832150d6cc142247dc42a32aaefb56d0099895fd229",
)

if go_sdk:
go_repository_cache(
name = "bazel_gazelle_go_repository_cache",
Expand Down
6 changes: 4 additions & 2 deletions internal/go_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@ repo(default_package_metadata = ["//:gazelle_generated_package_info"])

def _generate_package_info(*, importpath, version):
package_name = importpath
package_url = "https://" + importpath
package_version = version.removeprefix("v")

# TODO: Consider adding support for custom remotes.
package_url = "https://" + importpath if version else None
package_version = version.removeprefix("v") if version else None
return """
load("@rules_license//rules:package_info.bzl", "package_info")
Expand Down

0 comments on commit 21fd0e8

Please sign in to comment.