Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from danmx/fix-git-chglog
Browse files Browse the repository at this point in the history
fix(git-chglog): using correct sources
  • Loading branch information
danmx authored Oct 15, 2021
2 parents 8d8fe04 + aca7562 commit 87aa050
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 16 deletions.
12 changes: 12 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")

buildifier(
name = "buildifier",
)

buildifier(
name = "buildifier_check",
diff_command = "diff -u",
lint_mode = "warn",
mode = "diff",
)
51 changes: 51 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
workspace(name = "com_github_danmx_bazel_tools")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

########################################
# Buildifier
########################################
http_archive(
name = "io_bazel_rules_go",
sha256 = "d1ffd055969c8f8d431e2d439813e42326961d0942bdf734d2c95dc30c369566",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.5/rules_go-v0.24.5.tar.gz",
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains()

http_archive(
name = "bazel_gazelle",
sha256 = "b85f48fa105c4403326e9525ad2b2cc437babaa6e15a3fc0b1dbab0ab064bc7c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz",
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

http_archive(
name = "com_google_protobuf",
sha256 = "c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db",
strip_prefix = "protobuf-3.17.3",
urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.17.3.tar.gz"],
)

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "c28eef4d30ba1a195c6837acf6c75a4034981f5b4002dda3c5aa6e48ce023cf1",
strip_prefix = "buildtools-4.0.1",
url = "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.0.1.tar.gz",
)
6 changes: 3 additions & 3 deletions git-chglog/BUILD
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
alias(
name = "run",
actual = select({
"@com_github_danmx_bazel_tools//bazel/platforms:linux-x86_64": "@git-chglog-linux-amd64//file:git-chglog",
"@com_github_danmx_bazel_tools//bazel/platforms:macos-x86_64": "@git-chglog-darwin-amd64//file:git-chglog",
"@com_github_danmx_bazel_tools//bazel/platforms:windows-x86_64": "@git-chglog-windows-amd64//file:git-chglog",
"@com_github_danmx_bazel_tools//bazel/platforms:linux-x86_64": "@git-chglog-linux-amd64//:git-chglog",
"@com_github_danmx_bazel_tools//bazel/platforms:macos-x86_64": "@git-chglog-darwin-amd64//:git-chglog",
"@com_github_danmx_bazel_tools//bazel/platforms:windows-x86_64": "@git-chglog-windows-amd64//:git-chglog.exe",
}),
visibility = ["//visibility:public"],
)
23 changes: 10 additions & 13 deletions git-chglog/deps.bzl
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def git_chglog_dependencies():
http_file(
http_archive(
name = "git-chglog-linux-amd64",
urls = ["https://github.com/git-chglog/git-chglog/releases/download/0.15.0/git-chglog_linux_amd64"],
urls = ["https://github.com/git-chglog/git-chglog/releases/download/v0.15.0/git-chglog_0.15.0_linux_amd64.tar.gz"],
sha256 = "815ff0b78b3c3a0cc5e5e456d5f022a56d1f8e34d99165e4476e74be68646854",
executable = True,
downloaded_file_path = "git-chglog",
build_file = "@com_github_danmx_bazel_tools//git-chglog:git-chglog.BUILD",
)
http_file(
http_archive(
name = "git-chglog-darwin-amd64",
urls = ["https://github.com/git-chglog/git-chglog/releases/download/0.15.0/git-chglog_darwin_amd64"],
urls = ["https://github.com/git-chglog/git-chglog/releases/download/v0.15.0/git-chglog_0.15.0_darwin_amd64.tar.gz"],
sha256 = "286497fb978e1ed70c7a9a1076ee47060547e2a8230b0f1a0d566b112a338e99",
executable = True,
downloaded_file_path = "git-chglog",
build_file = "@com_github_danmx_bazel_tools//git-chglog:git-chglog.BUILD",
)
http_file(
http_archive(
name = "git-chglog-windows-amd64",
urls = ["https://github.com/git-chglog/git-chglog/releases/download/0.15.0/git-chglog_windows_amd64.exe"],
urls = ["https://github.com/git-chglog/git-chglog/releases/download/v0.15.0/git-chglog_0.15.0_windows_amd64.zip"],
sha256 = "d44ca8282c547c5e02529e10a4fcc11ff00d149b6d2c411ae6cb1b3b1b44ecb4",
executable = True,
downloaded_file_path = "git-chglog",
build_file = "@com_github_danmx_bazel_tools//git-chglog:git-chglog_windows.BUILD",
)
4 changes: 4 additions & 0 deletions git-chglog/git-chglog.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exports_files(
["git-chglog"],
visibility = ["//visibility:public"],
)
4 changes: 4 additions & 0 deletions git-chglog/git-chglog_windows.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
exports_files(
["git-chglog.exe"],
visibility = ["//visibility:public"],
)

0 comments on commit 87aa050

Please sign in to comment.