Skip to content

Commit 06112b6

Browse files
johnbartholomewfilmil
authored andcommitted
jsonnet_go 0.21.0 (bazelbuild#4551)
Publish jsonnet_go 0.21.0 to match https://github.com/google/go-jsonnet/releases/tag/v0.21.0
1 parent a574bf4 commit 06112b6

File tree

4 files changed

+88
-1
lines changed

4 files changed

+88
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module(name = "jsonnet_go", version = "0.21.0")
2+
3+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4+
5+
# NB: update_cpp_jsonnet.sh looks for these.
6+
CPP_JSONNET_SHA256 = "f3b0bb65445568382ed7a5a985d1c950dad69415949bd7ee24938c5872da8685"
7+
CPP_JSONNET_GITHASH = "bbb38f1020be1f5aed560928fb839b2c448cefb4"
8+
CPP_JSONNET_RELEASE_VERSION = "v0.21.0"
9+
10+
CPP_JSONNET_STRIP_PREFIX = (
11+
"jsonnet-" + (
12+
CPP_JSONNET_RELEASE_VERSION if CPP_JSONNET_RELEASE_VERSION else CPP_JSONNET_GITHASH
13+
)
14+
)
15+
CPP_JSONNET_URL = (
16+
"https://github.com/google/jsonnet/releases/download/%s/jsonnet-%s.tar.gz" % (
17+
CPP_JSONNET_RELEASE_VERSION,
18+
CPP_JSONNET_RELEASE_VERSION,
19+
) if CPP_JSONNET_RELEASE_VERSION else "https://github.com/google/jsonnet/archive/%s.tar.gz" % CPP_JSONNET_GITHASH
20+
)
21+
22+
# We don't use a normal bazel_dep reference for the cpp_jsonnet module,
23+
# because we want to pin to the specific jsonnet commit (which might not
24+
# even exactly match a released version).
25+
http_archive(
26+
name = "cpp_jsonnet",
27+
sha256 = CPP_JSONNET_SHA256,
28+
strip_prefix = CPP_JSONNET_STRIP_PREFIX,
29+
urls = [CPP_JSONNET_URL],
30+
)
31+
32+
bazel_dep(name = "gazelle", version = "0.42.0", repo_name = "bazel_gazelle")
33+
bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "io_bazel_rules_go")
34+
35+
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
36+
go_sdk.download(version = "1.23.7")
37+
38+
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
39+
go_deps.from_file(go_mod = "@jsonnet_go//:go.mod")
40+
use_repo(
41+
go_deps,
42+
"com_github_fatih_color",
43+
"com_github_sergi_go_diff",
44+
"io_k8s_sigs_yaml",
45+
"org_golang_x_crypto",
46+
)
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- ubuntu2004
5+
- macos
6+
- macos_arm64
7+
bazel:
8+
- 8.x
9+
- 7.x
10+
tasks:
11+
verify_targets:
12+
name: Verify build targets
13+
platform: ${{ platform }}
14+
bazel: ${{ bazel }}
15+
build_targets:
16+
- '@jsonnet_go//...'
17+
bcr_test_module:
18+
module_path: examples/bazel
19+
matrix:
20+
platform:
21+
- debian10
22+
- ubuntu2004
23+
- macos
24+
- macos_arm64
25+
bazel:
26+
- 8.x
27+
- 7.x
28+
tasks:
29+
run_test_module:
30+
name: Build example module
31+
platform: ${{ platform }}
32+
bazel: ${{ bazel }}
33+
build_targets:
34+
- '//:use_go_jsonnet_lib'
35+
- '//:use_go_jsonnet'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"url": "https://github.com/google/go-jsonnet/releases/download/v0.21.0/go-jsonnet-v0.21.0.tar.gz",
3+
"integrity": "sha256-E7mVK7NrH3viRON8Ay2grPHsN7QVI/UkLo5029k6az8=",
4+
"strip_prefix": "go-jsonnet-v0.21.0"
5+
}

modules/jsonnet_go/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
],
1414
"versions": [
1515
"0.20.0",
16-
"0.21.0-rc2"
16+
"0.21.0-rc2",
17+
"0.21.0"
1718
],
1819
"yanked_versions": {}
1920
}

0 commit comments

Comments
 (0)