start
This commit is contained in:
49
WORKSPACE
49
WORKSPACE
@ -1,36 +1,23 @@
|
||||
git_repository(
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
# git_repository(
|
||||
# name = "io_bazel_rules_go",
|
||||
# remote = "https://github.com/bazelbuild/rules_go.git",
|
||||
# branch = "master",
|
||||
# )
|
||||
|
||||
http_archive(
|
||||
name = "io_bazel_rules_go",
|
||||
remote = "https://github.com/bazelbuild/rules_go.git",
|
||||
commit = "373feb6",
|
||||
sha256 = "6b65cb7917b4d1709f9410ffe00ecf3e160edf674b78c54a894471320862184f",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip",
|
||||
"https://github.com/bazelbuild/rules_go/releases/download/v0.39.0/rules_go-v0.39.0.zip",
|
||||
],
|
||||
)
|
||||
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_repositories")
|
||||
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
||||
|
||||
go_repositories()
|
||||
go_rules_dependencies()
|
||||
|
||||
git_repository(
|
||||
name = "ws_remote",
|
||||
remote = "https://github.com/laramiel/bazel-example-golang-remote.git",
|
||||
commit = "4a9199b",
|
||||
)
|
||||
|
||||
|
||||
BARE_BUILD = """
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_prefix", "go_library")
|
||||
|
||||
go_prefix("github.com/laramiel/bazel-example-golang-bare")
|
||||
|
||||
go_library(
|
||||
name = "bare",
|
||||
srcs = [ "bare.go" ],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
"""
|
||||
|
||||
new_git_repository(
|
||||
name = "ws_bare",
|
||||
remote = "https://github.com/laramiel/bazel-example-golang-bare.git",
|
||||
commit = "3bd848f",
|
||||
build_file_content = BARE_BUILD
|
||||
)
|
||||
go_register_toolchains(version = "1.19.3")
|
||||
|
Reference in New Issue
Block a user