Skip to content

Commit c19b673

Browse files
committed
Merge branch 'levsha/-IDX-2827-Make-base-url-configurable-in-sha256sum2url-' into 'master'
[IDX-2827] Make base url configurable in sha256sum2url. See merge request dfinity-lab/public/ic!12508
2 parents 7ceee10 + 9cb4ebc commit c19b673

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bazel/defs.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _sha256sum2url_impl(ctx):
6767
out = ctx.actions.declare_file(ctx.label.name)
6868
ctx.actions.run(
6969
executable = "awk",
70-
arguments = ["-v", "out=" + out.path, '{ printf "https://artifacts.idx.dfinity.network/cas/%s", $1 > out }', ctx.file.src.path],
70+
arguments = ["-v", "out=" + out.path, "-v", "base_url=" + ctx.attr.base_url, '{ printf "%s/cas/%s", base_url, $1 > out }', ctx.file.src.path],
7171
inputs = [ctx.file.src],
7272
outputs = [out],
7373
)
@@ -77,6 +77,7 @@ sha256sum2url = rule(
7777
implementation = _sha256sum2url_impl,
7878
attrs = {
7979
"src": attr.label(allow_single_file = True),
80+
"base_url": attr.string(default = "https://artifacts.idx.dfinity.network"),
8081
},
8182
)
8283

0 commit comments

Comments
 (0)