Skip to content

Commit

Permalink
helm: tidy BUILD files, move rules to helm subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed May 19, 2019
1 parent ed1108d commit 872a719
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 35 deletions.
28 changes: 0 additions & 28 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,3 @@ sh_test(
".dummy_test.sh",
],
)

load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

# package(default_visibility = ["//visibility:public"])
package(default_visibility = ["//visibility:public"])

load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")

bzl_library(

name = "skylib_paths",
srcs = ["@bazel_skylib//lib:paths.bzl"],
)
# bzl_library(
# name = "bazel_tools_pkg",
# srcs = ["@bazel_tools//tools:srcs"],
# )

stardoc(
name = "docs",
out = "docs.md",
input = "helm.bzl",
deps = [
":skylib_paths",
# ":bazel_tools_pkg",
],
)
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ all: docs ci

.PHONY: docs
docs: deps
bazel build //:docs && cp bazel-bin/docs.md .
@chmod +w docs.md
bazel build //docs && cp bazel-bin/docs/docs.md docs
@chmod +w docs/docs.md

.PHONY: deps
ifeq ($(UNAME),Darwin)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This allows you to describe Kubernetes applications in a deterministic manner.

## Documentation

* See [Rule and macro defintions](./docs.md) for macro documentation.
* See [Rule and macro defintions](./docs/docs.md) for macro documentation.

### API

Expand All @@ -24,7 +24,7 @@ In your Bazel `WORKSPACE` file add this repository as a dependency:
```
git_repository(
name = "com_github_tmc_rules_helm",
tag = "0.1.0",
tag = "0.2.0",
remote = "https://github.com/tmc/rules_helm.git",
)
```
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load(":repos.bzl", "helm_repositories")

helm_repositories()

load(":buildifier.bzl", "buildifier_repositories")
load("//tools:buildifier.bzl", "buildifier_repositories")
buildifier_repositories()

# Start stardoc rules
Expand Down
20 changes: 20 additions & 0 deletions docs/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
load("@io_bazel_skydoc//stardoc:stardoc.bzl", "stardoc")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

package(default_visibility = ["//visibility:public"])

load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")

bzl_library(
name = "skylib_paths",
srcs = ["@bazel_skylib//lib:paths.bzl"],
)

stardoc(
name = "docs",
out = "docs.md",
input = "//helm:helm.bzl",
deps = [
":skylib_paths",
],
)
File renamed without changes.
1 change: 1 addition & 0 deletions helm/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports_files(["helm.bzl"])
2 changes: 0 additions & 2 deletions helm.bzl → helm/helm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def helm_chart(name, srcs, update_deps = False):
srcs: Source files to include as the helm chart. Typically this will just be glob(["**"]).
update_deps: Whether or not to run a helm dependency update prior to packaging.
"""
format: The format to write the Rat check report in.
visibility: The visibility of this rule.
filegroup_name = name + "_filegroup"
helm_cmd_name = name + "_package.sh"
package_flags = ""
Expand Down
File renamed without changes.

0 comments on commit 872a719

Please # to comment.