certstrap icon indicating copy to clipboard operation
certstrap copied to clipboard

Adds Gazelle generated deps.bzl file

Open snowp opened this issue 4 years ago • 2 comments

This sets up certstrap for easier import from Bazel projects: with this, certstrap can be imported with the following Bazel WORKSPACE snippet, assuming that Gazelle has been set up in the repo trying to import certstrap.

go_repository(
    name = "com_github_square_certstrap",
    importpath = "github.com/square/certstrap",
    version = "v1.2.1",
    sum = "some shasum",
)

load("@com_github_square_certstrap//:deps.bzl", "certstrap_dependencies")

certstrap_dependencies()

which allows referring to the certstrap binary using @com_github_square_certstrap//:certstrap.

To keep this up to date, bazel run //:gazelle -- update-repos -to_macro deps.bzl%certstrap_dependencies -from_file=go.mod must be run whenever go.mod changes, which would ideally be automated, but at the very least validated in CI. Optionally this could not rely on bazel and just install gazelle directly using go get. Let me know what you all think!

snowp avatar Mar 25 '20 16:03 snowp

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Mar 25 '20 16:03 CLAassistant

Hey @snowp can you sign the CLA?

mweissbacher avatar Mar 31 '20 22:03 mweissbacher