Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Gazelle generated deps.bzl file #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

None yet

3 participants