Skip to content

Commit 8541d12

Browse files
update cppjsonnet and add git_override for jsonnet bazel module dep
1 parent ba82aee commit 8541d12

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

Diff for: MODULE.bazel

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
module(name = "jsonnet_go", version = "0.0.0")
22

3+
# NB: update_cpp_jsonnet.sh looks for this.
4+
CPP_JSONNET_GITHASH = "5a4e8e34cc1fe841bdebb983646b9b9ae8fa8ca4"
5+
6+
# https://bazel.build/rules/lib/globals/module#git_override
7+
git_override(
8+
module_name = "jsonnet",
9+
commit = CPP_JSONNET_GITHASH,
10+
remote = "https://github.com/google/jsonnet.git",
11+
)
12+
313
bazel_dep(name = "gazelle", version = "0.41.0", repo_name = "bazel_gazelle")
414
bazel_dep(name = "jsonnet", version = "0.20.0", repo_name = "cpp_jsonnet")
515
bazel_dep(name = "rules_go", version = "0.48.0", repo_name = "io_bazel_rules_go")

Diff for: bazel/repositories.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load(
44
)
55

66
# NB: update_cpp_jsonnet.sh looks for these.
7-
CPP_JSONNET_SHA256 = "9e545f17b614c89d40d1f58d7f8fceded4cc93d1d29edfd8a93833b61201fd20"
8-
CPP_JSONNET_GITHASH = "4487bfb8ba7ed7a3d91d79d4a1aa2205e7839558"
7+
CPP_JSONNET_SHA256 = "e7d14d8ad65dc334b9a9f3bd1c542a82b3b80029860a8d78fd829b23d0e9845b"
8+
CPP_JSONNET_GITHASH = "5a4e8e34cc1fe841bdebb983646b9b9ae8fa8ca4"
99

1010
def jsonnet_go_repositories():
1111
http_archive(

Diff for: update_cpp_jsonnet.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ sha256=$(curl -fL https://github.com/google/jsonnet/archive/$hash.tar.gz | shasu
1717
sed -i.bak \
1818
-e "s/CPP_JSONNET_SHA256 = .*/CPP_JSONNET_SHA256 = \"$sha256\"/;" \
1919
-e "s/CPP_JSONNET_GITHASH = .*/CPP_JSONNET_GITHASH = \"$hash\"/;" \
20-
bazel/repositories.bzl
20+
bazel/repositories.bzl MODULE.bazel
2121

2222
# NB: macOS sed doesn't support -i without arg. This is the easy workaround.
2323
rm bazel/repositories.bzl.bak
24+
rm MODULE.bazel.bak
2425

2526
set +x
2627
echo

0 commit comments

Comments
 (0)