square / certstrap

Tools to bootstrap CAs, certificate requests, and signed certificates.
Apache License 2.0
2.31k stars 207 forks source link

Adds Gazelle generated deps.bzl file #101

Open snowp opened 4 years ago

snowp commented 4 years ago

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!

CLAassistant commented 4 years ago

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.

mweissbacher commented 4 years ago

Hey @snowp can you sign the CLA?