Skip to content

Commit

Permalink
Switch from Skydoc to Stardoc
Browse files Browse the repository at this point in the history
Fixes: #177
  • Loading branch information
EdSchouten committed Apr 4, 2024
1 parent 36fdb4c commit 9d5a4b3
Show file tree
Hide file tree
Showing 10 changed files with 452 additions and 50 deletions.
10 changes: 10 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ tasks:
build_targets:
- //...

docs:
name: docs
platform: ${{ platform }}
working_directory: docs
test_flags:
- --define
- jsonnet_port=${{ jsonnet_port }}
test_targets:
- //...

examples:
name: examples
platform: ${{ platform }}
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ module(
repo_name = "io_bazel_rules_jsonnet",
)

bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "jsonnet", version = "0.20.0")
bazel_dep(name = "jsonnet_go", version = "0.20.0", repo_name = "google_jsonnet_go")
35 changes: 0 additions & 35 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
workspace(name = "io_bazel_rules_jsonnet")

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

local_repository(
name = "docs",
path = "docs",
)

load("//jsonnet:jsonnet.bzl", "jsonnet_repositories")

jsonnet_repositories()
Expand All @@ -18,31 +11,3 @@ jsonnet_go_repositories()
load("@google_jsonnet_go//bazel:deps.bzl", "jsonnet_go_dependencies")

jsonnet_go_dependencies(go_sdk_version = "1.17.8")

# Used for documenting Jsonnet rules.
# TODO: Move this to docs/WORKSPACE when recursive repositories are enabled.
git_repository(
name = "io_bazel_rules_sass",
remote = "https://github.com/bazelbuild/rules_sass.git",
commit = "a28d5ec04b32daef96299b22bb2fbd961c3febe6", # release 1.15.3
shallow_since = "1546636230 +0000"
)

load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")

rules_sass_dependencies()

load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")

sass_repositories()

git_repository(
name = "io_bazel_skydoc",
remote = "https://github.com/bazelbuild/skydoc.git",
commit = "4ea7b8257d11ac33eef7e9daadbedbfe375d9236", # release 0.2.0
shallow_since = "1543532884 -0500",
)

load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")

skydoc_repositories()
10 changes: 0 additions & 10 deletions docs/BUILD

This file was deleted.

10 changes: 10 additions & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs")

stardoc_with_diff_test(
name = "jsonnet",
bzl_library_target = "@rules_jsonnet//jsonnet:jsonnet",
)

update_docs(
name = "update",
)
13 changes: 13 additions & 0 deletions docs/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module(
name = "docs",
version = "0.0.0",
)

bazel_dep(name = "aspect_bazel_lib", version = "2.7.0")
bazel_dep(name = "stardoc", version = "0.6.2")

bazel_dep(name = "rules_jsonnet", version = "0.5.0")
local_path_override(
module_name = "rules_jsonnet",
path = "..",
)
1 change: 0 additions & 1 deletion docs/WORKSPACE

This file was deleted.

Loading

0 comments on commit 9d5a4b3

Please sign in to comment.