Skip to content

Conversation

@snowp
Copy link

@snowp snowp commented Mar 25, 2020

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
Copy link

CLAassistant commented Mar 25, 2020

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
Copy link
Contributor

Hey @snowp can you sign the CLA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants