file_hash

command
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

file_hash

Bazel rule for hashing. Supports MD5, SHA1, SHA256, SHA512.

Setup and usage via Bazel

WORKSPACE file:

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

# file_hash is written in Go and hence needs rules_go to be built.
# See https://github.com/bazelbuild/rules_go for the up to date setup instructions.
http_archive(
    name = "io_bazel_rules_go",
)

git_repository(
    name = "com_github_ash2k_bazel_tools",
    commit = "<commit>",
    remote = "https://github.com/ash2k/bazel-tools.git",
    shallow_since = "<bla>",
)

BUILD.bazel file:

load("@com_github_ash2k_bazel_tools//file_hash:def.bzl", "file_hash")

file_hash(
    name = "something_sha256",
    algorithm = "sha256",
    hex = True,
    files = [
        "file1",
        "file2",
    ],
)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL