Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgrindel/bazel-starlib
Rules, macros, and APIs that are useful for the implementation of Bazel repositories.
https://github.com/cgrindel/bazel-starlib
bazel starlark
Last synced: 2 days ago
JSON representation
Rules, macros, and APIs that are useful for the implementation of Bazel repositories.
- Host: GitHub
- URL: https://github.com/cgrindel/bazel-starlib
- Owner: cgrindel
- License: apache-2.0
- Created: 2021-10-30T19:59:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-22T19:15:03.000Z (11 days ago)
- Last Synced: 2024-12-22T19:21:21.572Z (11 days ago)
- Topics: bazel, starlark
- Language: Starlark
- Homepage:
- Size: 1.02 MB
- Stars: 18
- Watchers: 3
- Forks: 4
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bazel Starlib
[![Build](https://github.com/cgrindel/bazel-starlib/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/cgrindel/bazel-starlib/actions/workflows/ci.yml)
Bazel Starlib is a collection of projects that contain rulesets and libraries that are useful for
the implementation of Bazel projects.| Project | Description | Documentation |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| bazeldoc | Generate Starlark documentation using [Bazel Stardoc](https://github.com/bazelbuild/stardoc). Formerly hosted as [bazel-doc](https://github.com/cgrindel/bazel-doc). | [API](/doc/bazeldoc/), [How-to](/bazeldoc/) |
| bzlformat | Format Bazel Starlark files using [Buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier), test that the formatted files exist in the workspace directory, and copy formatted files to the workspace directory. Formerly hosted as [rules_bzlformat](https://github.com/cgrindel/rules_bzlformat). | [API](/doc/bzlformat/), [How-to](/bzlformat/), [Examples](/examples/bzlformat/) |
| bzllib | Collection of Starlark libraries. | [API](/doc/bzllib/), [How-to](/bzllib/) |
| bzlrelease | Automate and customize the generation of releases using GitHub Actions. | [API](/doc/bzlrelease/), [How-to](/bzlrelease/) |
| bzltidy | Collect Bazel actions that keep your source files up-to-date. | [API](/doc/bztidy/), [How-to](/bzltidy/) |
| markdown | Maintain markdown files. | [API](/doc/markdown/), [How-to](/markdown/), [Examples](/examples/markdown/) |
| shlib | Collection of libraries useful when implementing shell binaries, libraries, and tests. Formerly hosted as [bazel_shlib](https://github.com/cgrindel/bazel_shlib). | [API](/doc/shlib/), [How-to](/shlib/) |
| updatesrc | Copy files from the Bazel output directories to the workspace directory. Formerly hosted as [rules_updatesrc](https://github.com/cgrindel/rules_updatesrc) | [API](/doc/updatesrc/), [How-to](/updatesrc/), [Examples](/examples/updatesrc/) |## Table of Contents
- [Quickstart](#quickstart)
- [Workspace Configuration](#workspace-configuration)
- [Other Documentation](#other-documentation)## Quickstart
The following provides a quick introduction on how to load this repository into your workspace. For
more information on how to use the projects from this repository in your workspace, check out the
how-to links above and review the [the generated documentation](/doc/).### `MODULE.bazel` Snippet
```python
bazel_dep(name = "cgrindel_bazel_starlib", version = "0.21.0")
```### Workspace Configuration
```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")http_archive(
name = "cgrindel_bazel_starlib",
sha256 = "c088657482e86888c9f46f535bdbaf71eaeb35ff9db04912a4ecdccf94cd16d5",
urls = [
"https://github.com/cgrindel/bazel-starlib/releases/download/v0.21.0/bazel-starlib.v0.21.0.tar.gz",
],
)load("@cgrindel_bazel_starlib//:deps.bzl", "bazel_starlib_dependencies")
bazel_starlib_dependencies()
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
```## Developer Documentation
### To Add a Golang Dependency
Execute the following to update the go module files, resolve the Golang dependencies and update the
Bazel build files.```sh
$ bazel run @io_bazel_rules_go//go -- github.com/sweet/go_pkg
$ bazel run //:go_mod_tidy
$ bazel run //:gazelle_update_repos
$ bazel run //:update_build_files
```## Other Documentation
- [Release process for this repository](release/README.md)