Skip to content

Commit

Permalink
feat: add support for .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed Sep 20, 2024
1 parent 571d953 commit 1256149
Show file tree
Hide file tree
Showing 85 changed files with 5,649 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ tasks:
# which doesn't match the golden files generated on *nix.
- "-//tests:fix_mode_print0"
- "-//tests:fix_mode_strict"
# bazel collecting+renaming .git* files does not work on windows
- "-//tests:gitignore"
windows:
name: Windows with WORKSPACE
platform: windows
Expand Down Expand Up @@ -183,6 +185,8 @@ tasks:
# which doesn't match the golden files generated on *nix.
- "-//tests:fix_mode_print0"
- "-//tests:fix_mode_strict"
# bazel collecting+renaming .git* files does not work on windows
- "-//tests:gitignore"
incompatible:
name: Ubuntu 22.04 with WORKSPACE and --config=incompatible
platform: ubuntu2204
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use_repo(
"com_github_bazelbuild_buildtools",
"com_github_bmatcuk_doublestar_v4",
"com_github_fsnotify_fsnotify",
"com_github_go_git_go_git_v5",
"com_github_google_go_cmp",
"com_github_pmezard_go_difflib",
"org_golang_x_mod",
Expand Down
33 changes: 33 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,57 @@ load("@bazel_skylib//lib:unittest.bzl", "register_unittest_toolchains")

register_unittest_toolchains()

# gazelle:repository go_repository name=cat_dario_mergo importpath=dario.cat/mergo
# gazelle:repository go_repository name=com_github_anmitsu_go_shlex importpath=github.com/anmitsu/go-shlex
# gazelle:repository go_repository name=com_github_armon_go_socks5 importpath=github.com/armon/go-socks5
# gazelle:repository go_repository name=com_github_bazelbuild_buildtools importpath=github.com/bazelbuild/buildtools
# gazelle:repository go_repository name=com_github_bazelbuild_rules_go importpath=github.com/bazelbuild/rules_go
# gazelle:repository go_repository name=com_github_bmatcuk_doublestar_v4 importpath=github.com/bmatcuk/doublestar/v4
# gazelle:repository go_repository name=com_github_cloudflare_circl importpath=github.com/cloudflare/circl
# gazelle:repository go_repository name=com_github_cyphar_filepath_securejoin importpath=github.com/cyphar/filepath-securejoin
# gazelle:repository go_repository name=com_github_davecgh_go_spew importpath=github.com/davecgh/go-spew
# gazelle:repository go_repository name=com_github_elazarl_goproxy importpath=github.com/elazarl/goproxy
# gazelle:repository go_repository name=com_github_emirpasic_gods importpath=github.com/emirpasic/gods
# gazelle:repository go_repository name=com_github_fsnotify_fsnotify importpath=github.com/fsnotify/fsnotify
# gazelle:repository go_repository name=com_github_gliderlabs_ssh importpath=github.com/gliderlabs/ssh
# gazelle:repository go_repository name=com_github_go_git_gcfg importpath=github.com/go-git/gcfg
# gazelle:repository go_repository name=com_github_go_git_go_billy_v5 importpath=github.com/go-git/go-billy/v5
# gazelle:repository go_repository name=com_github_go_git_go_git_fixtures_v4 importpath=github.com/go-git/go-git-fixtures/v4
# gazelle:repository go_repository name=com_github_go_git_go_git_v5 importpath=github.com/go-git/go-git/v5
# gazelle:repository go_repository name=com_github_gogo_protobuf importpath=github.com/gogo/protobuf
# gazelle:repository go_repository name=com_github_golang_groupcache importpath=github.com/golang/groupcache
# gazelle:repository go_repository name=com_github_golang_mock importpath=github.com/golang/mock
# gazelle:repository go_repository name=com_github_golang_protobuf importpath=github.com/golang/protobuf
# gazelle:repository go_repository name=com_github_google_go_cmp importpath=github.com/google/go-cmp
# gazelle:repository go_repository name=com_github_jbenet_go_context importpath=github.com/jbenet/go-context
# gazelle:repository go_repository name=com_github_kevinburke_ssh_config importpath=github.com/kevinburke/ssh_config
# gazelle:repository go_repository name=com_github_kr_pretty importpath=github.com/kr/pretty
# gazelle:repository go_repository name=com_github_kr_text importpath=github.com/kr/text
# gazelle:repository go_repository name=com_github_microsoft_go_winio importpath=github.com/Microsoft/go-winio
# gazelle:repository go_repository name=com_github_onsi_gomega importpath=github.com/onsi/gomega
# gazelle:repository go_repository name=com_github_pjbgf_sha1cd importpath=github.com/pjbgf/sha1cd
# gazelle:repository go_repository name=com_github_pkg_errors importpath=github.com/pkg/errors
# gazelle:repository go_repository name=com_github_pmezard_go_difflib importpath=github.com/pmezard/go-difflib
# gazelle:repository go_repository name=com_github_protonmail_go_crypto importpath=github.com/ProtonMail/go-crypto
# gazelle:repository go_repository name=com_github_rogpeppe_go_internal importpath=github.com/rogpeppe/go-internal
# gazelle:repository go_repository name=com_github_sergi_go_diff importpath=github.com/sergi/go-diff
# gazelle:repository go_repository name=com_github_skeema_knownhosts importpath=github.com/skeema/knownhosts
# gazelle:repository go_repository name=com_github_stretchr_testify importpath=github.com/stretchr/testify
# gazelle:repository go_repository name=com_github_xanzy_ssh_agent importpath=github.com/xanzy/ssh-agent
# gazelle:repository go_repository name=in_gopkg_check_v1 importpath=gopkg.in/check.v1
# gazelle:repository go_repository name=in_gopkg_warnings_v0 importpath=gopkg.in/warnings.v0
# gazelle:repository go_repository name=in_gopkg_yaml_v3 importpath=gopkg.in/yaml.v3
# gazelle:repository go_repository name=net_starlark_go importpath=go.starlark.net
# gazelle:repository go_repository name=org_golang_google_genproto importpath=google.golang.org/genproto
# gazelle:repository go_repository name=org_golang_google_grpc importpath=google.golang.org/grpc
# gazelle:repository go_repository name=org_golang_google_grpc_cmd_protoc_gen_go_grpc importpath=google.golang.org/grpc/cmd/protoc-gen-go-grpc
# gazelle:repository go_repository name=org_golang_google_protobuf importpath=google.golang.org/protobuf
# gazelle:repository go_repository name=org_golang_x_crypto importpath=golang.org/x/crypto
# gazelle:repository go_repository name=org_golang_x_mod importpath=golang.org/x/mod
# gazelle:repository go_repository name=org_golang_x_net importpath=golang.org/x/net
# gazelle:repository go_repository name=org_golang_x_sync importpath=golang.org/x/sync
# gazelle:repository go_repository name=org_golang_x_sys importpath=golang.org/x/sys
# gazelle:repository go_repository name=org_golang_x_term importpath=golang.org/x/term
# gazelle:repository go_repository name=org_golang_x_text importpath=golang.org/x/text
# gazelle:repository go_repository name=org_golang_x_tools importpath=golang.org/x/tools
# gazelle:repository go_repository name=org_golang_x_tools_go_vcs importpath=golang.org/x/tools/go/vcs
239 changes: 237 additions & 2 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,27 @@ def gazelle_dependencies(
name = "bazel_gazelle_is_bazel_module",
is_bazel_module = False,
)
_maybe(
go_repository,
name = "cat_dario_mergo",
importpath = "dario.cat/mergo",
sum = "h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=",
version = "v1.0.0",
)
_maybe(
go_repository,
name = "com_github_anmitsu_go_shlex",
importpath = "github.com/anmitsu/go-shlex",
sum = "h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=",
version = "v0.0.0-20200514113438-38f4b401e2be",
)
_maybe(
go_repository,
name = "com_github_armon_go_socks5",
importpath = "github.com/armon/go-socks5",
sum = "h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=",
version = "v0.0.0-20160902184237-e75332964ef5",
)
_maybe(
go_repository,
name = "com_github_bazelbuild_buildtools",
Expand All @@ -124,20 +145,101 @@ def gazelle_dependencies(
sum = "h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=",
version = "v4.6.1",
)
_maybe(
go_repository,
name = "com_github_cloudflare_circl",
importpath = "github.com/cloudflare/circl",
sum = "h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=",
version = "v1.3.7",
)
_maybe(
go_repository,
name = "com_github_cyphar_filepath_securejoin",
importpath = "github.com/cyphar/filepath-securejoin",
sum = "h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=",
version = "v0.2.4",
)
_maybe(
go_repository,
name = "com_github_davecgh_go_spew",
importpath = "github.com/davecgh/go-spew",
sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
version = "v1.1.1",
)
_maybe(
go_repository,
name = "com_github_elazarl_goproxy",
importpath = "github.com/elazarl/goproxy",
sum = "h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU=",
version = "v0.0.0-20230808193330-2592e75ae04a",
)
_maybe(
go_repository,
name = "com_github_emirpasic_gods",
importpath = "github.com/emirpasic/gods",
sum = "h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=",
version = "v1.18.1",
)
_maybe(
go_repository,
name = "com_github_fsnotify_fsnotify",
importpath = "github.com/fsnotify/fsnotify",
sum = "h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=",
version = "v1.7.0",
)
_maybe(
go_repository,
name = "com_github_gliderlabs_ssh",
importpath = "github.com/gliderlabs/ssh",
sum = "h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=",
version = "v0.3.7",
)
_maybe(
go_repository,
name = "com_github_go_git_gcfg",
importpath = "github.com/go-git/gcfg",
sum = "h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=",
version = "v1.5.1-0.20230307220236-3a3c6141e376",
)
_maybe(
go_repository,
name = "com_github_go_git_go_billy_v5",
importpath = "github.com/go-git/go-billy/v5",
sum = "h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=",
version = "v5.5.0",
)
_maybe(
go_repository,
name = "com_github_go_git_go_git_fixtures_v4",
importpath = "github.com/go-git/go-git-fixtures/v4",
sum = "h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=",
version = "v4.3.2-0.20231010084843-55a94097c399",
)
_maybe(
go_repository,
name = "com_github_go_git_go_git_v5",
importpath = "github.com/go-git/go-git/v5",
sum = "h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys=",
build_directives = [
# Exclude unused API which references modules with missing dependencies
"gazelle:exclude plumbing/format/gitignore/dir.go",
],
version = "v5.12.0",
)
_maybe(
go_repository,
name = "com_github_gogo_protobuf",
importpath = "github.com/gogo/protobuf",
sum = "h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=",
version = "v1.3.2",
)
_maybe(
go_repository,
name = "com_github_golang_groupcache",
importpath = "github.com/golang/groupcache",
sum = "h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=",
version = "v0.0.0-20210331224755-41bb18bfe9da",
)
_maybe(
go_repository,
name = "com_github_golang_mock",
Expand All @@ -159,13 +261,132 @@ def gazelle_dependencies(
sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=",
version = "v0.6.0",
)
_maybe(
go_repository,
name = "com_github_jbenet_go_context",
importpath = "github.com/jbenet/go-context",
sum = "h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=",
version = "v0.0.0-20150711004518-d14ea06fba99",
)
_maybe(
go_repository,
name = "com_github_kevinburke_ssh_config",
importpath = "github.com/kevinburke/ssh_config",
sum = "h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=",
version = "v1.2.0",
)
_maybe(
go_repository,
name = "com_github_kr_pretty",
importpath = "github.com/kr/pretty",
sum = "h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=",
version = "v0.3.1",
)
_maybe(
go_repository,
name = "com_github_kr_text",
importpath = "github.com/kr/text",
sum = "h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=",
version = "v0.2.0",
)
_maybe(
go_repository,
name = "com_github_microsoft_go_winio",
importpath = "github.com/Microsoft/go-winio",
sum = "h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=",
version = "v0.6.1",
)
_maybe(
go_repository,
name = "com_github_onsi_gomega",
importpath = "github.com/onsi/gomega",
sum = "h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=",
version = "v1.27.10",
)
_maybe(
go_repository,
name = "com_github_pjbgf_sha1cd",
importpath = "github.com/pjbgf/sha1cd",
sum = "h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=",
version = "v0.3.0",
)
_maybe(
go_repository,
name = "com_github_pkg_errors",
importpath = "github.com/pkg/errors",
sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=",
version = "v0.9.1",
)
_maybe(
go_repository,
name = "com_github_pmezard_go_difflib",
importpath = "github.com/pmezard/go-difflib",
sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=",
version = "v1.0.0",
)
_maybe(
go_repository,
name = "com_github_protonmail_go_crypto",
importpath = "github.com/ProtonMail/go-crypto",
sum = "h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78=",
version = "v1.0.0",
)
_maybe(
go_repository,
name = "com_github_rogpeppe_go_internal",
importpath = "github.com/rogpeppe/go-internal",
sum = "h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=",
version = "v1.11.0",
)
_maybe(
go_repository,
name = "com_github_sergi_go_diff",
importpath = "github.com/sergi/go-diff",
sum = "h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=",
version = "v1.3.2-0.20230802210424-5b0b94c5c0d3",
)
_maybe(
go_repository,
name = "com_github_skeema_knownhosts",
importpath = "github.com/skeema/knownhosts",
sum = "h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A=",
version = "v1.2.2",
)
_maybe(
go_repository,
name = "com_github_stretchr_testify",
importpath = "github.com/stretchr/testify",
sum = "h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=",
version = "v1.9.0",
)
_maybe(
go_repository,
name = "com_github_xanzy_ssh_agent",
importpath = "github.com/xanzy/ssh-agent",
sum = "h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=",
version = "v0.3.3",
)
_maybe(
go_repository,
name = "in_gopkg_check_v1",
importpath = "gopkg.in/check.v1",
sum = "h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=",
version = "v1.0.0-20201130134442-10cb98267c6c",
)
_maybe(
go_repository,
name = "in_gopkg_warnings_v0",
importpath = "gopkg.in/warnings.v0",
sum = "h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=",
version = "v0.1.2",
)
_maybe(
go_repository,
name = "in_gopkg_yaml_v3",
importpath = "gopkg.in/yaml.v3",
sum = "h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=",
version = "v3.0.1",
)
_maybe(
go_repository,
name = "net_starlark_go",
Expand Down Expand Up @@ -201,6 +422,13 @@ def gazelle_dependencies(
sum = "h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=",
version = "v1.33.0",
)
_maybe(
go_repository,
name = "org_golang_x_crypto",
importpath = "golang.org/x/crypto",
sum = "h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=",
version = "v0.21.0",
)
_maybe(
go_repository,
name = "org_golang_x_mod",
Expand All @@ -212,8 +440,8 @@ def gazelle_dependencies(
go_repository,
name = "org_golang_x_net",
importpath = "golang.org/x/net",
sum = "h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=",
version = "v0.18.0",
sum = "h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=",
version = "v0.22.0",
)
_maybe(
go_repository,
Expand All @@ -229,6 +457,13 @@ def gazelle_dependencies(
sum = "h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=",
version = "v0.25.0",
)
_maybe(
go_repository,
name = "org_golang_x_term",
importpath = "golang.org/x/term",
sum = "h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=",
version = "v0.18.0",
)
_maybe(
go_repository,
name = "org_golang_x_text",
Expand Down
Loading

0 comments on commit 1256149

Please sign in to comment.