diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index e882a2f0ef..0f4f07ac9f 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -1,4 +1,3 @@ exports_files([ - "sha1", "sha256", ]) diff --git a/tools/hashes.bzl b/tools/hashes.bzl index c652edbe1e..27e10e2402 100644 --- a/tools/hashes.bzl +++ b/tools/hashes.bzl @@ -2,14 +2,6 @@ def _impl(ctx): in_file = ctx.file.src basename = ctx.attr.src.label.name - out_sha1 = ctx.actions.declare_file("%s.sha1" % basename) - ctx.actions.run( - executable = ctx.executable._cmd_sha1, - outputs = [out_sha1], - inputs = [in_file], - arguments = [in_file.path, out_sha1.path], - ) - out_sha256 = ctx.actions.declare_file("%s.sha256" % basename) ctx.actions.run( executable = ctx.executable._cmd_sha256, @@ -19,12 +11,11 @@ def _impl(ctx): ) return DefaultInfo( - files = depset([out_sha1, out_sha256]), + files = depset([out_sha256]), ) def _get_outputs(src): return { - "sha1": src.name + ".sha1", "sha256": src.name + ".sha256", } @@ -32,12 +23,6 @@ hashes = rule( implementation = _impl, attrs = { "src": attr.label(mandatory = True, allow_single_file = True), - "_cmd_sha1": attr.label( - default = Label("//tools:sha1"), - allow_single_file = True, - executable = True, - cfg = "host", - ), "_cmd_sha256": attr.label( default = Label("//tools:sha256"), allow_single_file = True, diff --git a/tools/sha1 b/tools/sha1 deleted file mode 100755 index 4224a7138b..0000000000 --- a/tools/sha1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -o errexit -set -o nounset -set -o pipefail - -in=$1 -out=$2 - -if ( command -v sha1sum > /dev/null ); then - (sha1sum $in | cut -d' ' -f1) > $out -elif ( command -v shasum > /dev/null ); then - (shasum -a 1 $in | cut -d' ' -f1) > $out -else - echo "Neither sha1sum nor shasum command is available" - exit 1 -fi