Skip to content

CLI for generating build configurations.

License

Notifications You must be signed in to change notification settings

ALT-F4-LLC/build-configs

Repository files navigation

build-configs

License: Apache 2.0 Build Status

build-configs is an easy-to-use, standardised configuration generator built to ease development overhead when bootstrapping and updating configuration in ALT-F4 projects.

It was built primarily to solve problems within ALT-F4, but was chosen to be an open source project in order to demonstrate how the issue of type-standard configuration updates in a polyrepo environment could be implemented.

Installation

Installing build-configs can be done via Nix or by Go binary install:

$ nix profile install 'github:ALT-F4-LLC/build-configs#default' # with nix
$ go install github.com/ALT-F4-LLC/build-configs@latest # with go

Usage

To generate configuration with build-configs, you can use the generate subcommand in a directory with a build-configs.yaml or build-configs.json file present. See Examples for help with this.

$ build-configs generate

It is also possible to configure build-configs to leave otherwise templated be, similarly to the .gitignore file in a Git repository. The file used is called .bcignore, and takes a direct list of paths (globs are currently unsupported) to skip templating:

# ignore the flake, we customize it further.
flake.nix

Templates

go-cobra-cli

go-cobra-cli scaffolds a Cobra CLI tool with Go that can be used to build out internal tooling. This is the template this CLI uses.

go-lambda

go-lambda scaffolds an lambda setup in Go.

To use it, you need to run the generator and then run go mod init and go mod tidy, then update your vendorHash.

Examples

Some example configurations for our template types exist in the examples directory of the repo.

Contributing

While this is an internal project at ALT-F4, we still welcome contributions from the community in case you can spot an improvement or a suggestion!

Feel free to raise PRs and issues against this repository, but also understand that as this is an internal piece of tooling, some opinionations in templates and/or logic will be present and we may be stubborn with them!

License

build-configs is licensed under the Apache License version 2.0.