Skip to content

Commit

Permalink
refactor(sh): rename shasums -> sha
Browse files Browse the repository at this point in the history
  • Loading branch information
mgred committed May 20, 2024
1 parent 55064d2 commit 7a9fd86
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git archive --format=tar.gz \
--add-virtual-file="$PREFIX/toolchains/BUILD.bazel":"$(< "$toolchains_build_file")" \
-o "$RULES_ARCHIVE" "$TAG"

RULES_SHA=$(./sh/shasums.sh -a "$ALGO" "$RULES_ARCHIVE")
RULES_SHA=$(./sh/sha.bash -a "$ALGO" "$RULES_ARCHIVE")

echo "Created $RULES_ARCHIVE sha$ALGO:$RULES_SHA"

Expand Down
2 changes: 1 addition & 1 deletion e2e/test.awk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Print only the shasums
# Print only the sha
{ print $2 }
4 changes: 2 additions & 2 deletions lib/platform_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ echo -n \"{platform} \";
echo -n \"{url} \";
echo -n \"{binary} \";
echo -n \"{algo} \";
./$(location //sh:shasums) -a {algo} -u {url}
./$(location //sh:sha) -a {algo} -u {url}
) > $(OUTS)
""".format(
algo = algo,
url = url,
platform = platform,
binary = binary,
),
tools = ["//sh:shasums"],
tools = ["//sh:sha"],
)

def _switch(val, arms, default = None):
Expand Down
6 changes: 3 additions & 3 deletions sh/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package(
)

sh_binary(
name = "shasums",
srcs = ["shasums.bash"],
name = "sha",
srcs = ["sha.bash"],
tags = ["manual"],
)

Expand All @@ -28,7 +28,7 @@ bzl_library(
shellcheck_test(
name = "lint",
srcs = [
# "shasums.bash",
# "sha.bash",
"tag.bash",
],
)
File renamed without changes.
6 changes: 3 additions & 3 deletions sh/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ package(
)

bats_test(
name = "shasums_test",
srcs = ["shasums.bats"],
data = ["//sh:shasums.bash"],
name = "sha_test",
srcs = ["sha.bats"],
data = ["//sh:sha.bash"],
)

bats_test(
Expand Down
4 changes: 2 additions & 2 deletions sh/test/shasums.bats → sh/test/sha.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ bats_load_library "bats-support"
bats_load_library "bats-assert"

@test "exit code, invoking with no arguments" {
run ./sh/shasums.bash
run ./sh/sha.bash
[ "$status" -eq 0 ]
}

@test "output, invoking with no arguments" {
run ./sh/shasums.bash
run ./sh/sha.bash
assert_output --partial "Usage:"
}

0 comments on commit 7a9fd86

Please sign in to comment.