oscar

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2025 License: MIT Imports: 1 Imported by: 0

README

oscar: the OpenSourceCorp Automation Runner

Github Actions

oscar ("OpenSourceCorp Automation Runner") is a highly-opinionated, out-of-the-box task runner designed for use across OSC.

oscar is "highly-opinionated" in that it is designed to do each thing one single way. No choosing what linters to run or how to configure them, no picking which annual flavor of Python or Nodejs packaging tool, no discrepancies in how to cut & deploy releases, etc. -- oscar is built to be the authoritative toolset for entire teams and their codebases.

Features

You run oscar by providing it a subcommand, such as ci. You can see the full available subcommand list via oscar --help.

Feature oscar command Details
Continuous integration oscar ci section
Delivery oscar deliver section
Continuous Integration

oscar ci runs a suite of continuous integration checks against your codebase, serving as something of a linter aggregator. It provides these checks based on file discovery across your codebase, and will only run checks based on what it finds. It also has behavior inspired by a tool named pre-commit, including failing runs if any checks introduce Git diffs during their runs.

Note again that these checks are highly opinionated -- if a particular linter supports configuration, oscar configures it, but it uses its own built-in configuration. For example, if you try to change the line-length limit rule for markdownlint-cli2 to be 120, oscar will ignore your request and run the check with its built-in limit of 100. This behavior is intentional, and serves to drive consistency across all manner of software that oscar could possibly run against within a set of codebases.

However, this does not mean that someone is prevented from adding additional checks outside of oscar's purview -- it just means that you cannot override what oscar does control.

Delivery

TODO

Artifact types Targets oscar.yaml field
Go binaries GitHub Releases deliverables.go_github_release
Container images Any OCI registry deliverables.container_image

Requirements

Before getting started, note that oscar has a few host-system runtime dependencies. Some of these may someday be replaced natively in the future, but some are integral to how oscar works internally.

  • bash (version 4.4+)
  • GNU coreutils
  • git

In addition, some components of oscar may require additional host-system tools (e.g. a container runtime like Docker for building & pushing container images).

If you are running on macOS, you should be able to install any missing tools via brew install-ing the above by name -- but make sure your $PATH is pointing to the correct ones and not the default BSD-equivalents.

Supported platforms

oscar is designed to run on Linux, and should mostly work on macOS as well. Native Windows has not been tested, and is unlikely to work. If you are on a Windows machine, you can run oscar in a WSL2 environment and it will work the same as on Linux.

Development & Contributions

Please see CONTRIBUTING.md for details about developing oscar.

Acknowledgements

Under the hood, oscar uses the excellent mise quite heavily, and would like to thank the author & contributors for making something like oscar possible without a lot of wheel-reinvention.

Roadmap

  • Add oscar.yaml generator
  • Add check for changelog Markdown file that matches oscar.yaml:version (we should also use that file as the exact GH Release post contents)
  • Workstation setup
    • Have oscar manage Makefiles, dotfiles, etc.
    • Also have it dump its own mise.toml for the user
    • self-update subcommand
  • CI additions
    • Protobuf (especially since there's proto code in this repo now)
    • Terraform
  • CD additions
    • Publishing to ghcr is confirmed to be working when run on main branch

Documentation

Overview

Package oscar sits at the root of the repo, and allows us to embed files all the way down the tree.

Index

Constants

This section is empty.

Variables

View Source
var Files embed.FS

Files holds any embedded files for use elsewhere across the codebase. Notably, it also holds the 'mise.toml' file that is used for not only oscar's own development config but also for its internals.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
oscar command
Package main runs oscar.
Package main runs oscar.
internal
cli
Package icli defines the command-line tooling for oscar.
Package icli defines the command-line tooling for oscar.
consts
Package consts provides a shared place for constants & global variables for usage across the codebase.
Package consts provides a shared place for constants & global variables for usage across the codebase.
git
Package igit provides interoperability with Git.
Package igit provides interoperability with Git.
hostinfo
Package hostinfo provides functionality for getting data about the host system.
Package hostinfo provides functionality for getting data about the host system.
oscarcfg
Package oscarcfg defines types & behavior for working with oscar's config file format.
Package oscarcfg defines types & behavior for working with oscar's config file format.
print
Package iprint contains helper functions for printing information for the caller.
Package iprint contains helper functions for printing information for the caller.
tasks/ci
Package ci defines behavior for running CI checks.
Package ci defines behavior for running CI checks.
tasks/delivery
Package delivery defines behavior for running delivery tasks.
Package delivery defines behavior for running delivery tasks.
tasks/tools/containers
Package containertools contains logic for running tasks for OCI containers (including Containerfiles).
Package containertools contains logic for running tasks for OCI containers (including Containerfiles).
tasks/tools/gittag
Package gittagtools contains logic for running tasks for Git Tags.
Package gittagtools contains logic for running tasks for Git Tags.
tasks/tools/go
Package gotools contains logic for running tasks for Go.
Package gotools contains logic for running tasks for Go.
tasks/tools/markdown
Package mdtools contains logic for running tasks for Markdown.
Package mdtools contains logic for running tasks for Markdown.
tasks/tools/python
Package pytools contains logic for running tasks for Python.
Package pytools contains logic for running tasks for Python.
tasks/tools/shell
Package shtools contains logic for running tasks for Shell languages.
Package shtools contains logic for running tasks for Shell languages.
tasks/tools/toolcfg
Package toolcfg is used for storing embeddable config files for various tools, that are injected at runtime.
Package toolcfg is used for storing embeddable config files for various tools, that are injected at runtime.
tasks/tools/version
Package versiontools contains logic for running tasks against the codebase version identifier(s).
Package versiontools contains logic for running tasks against the codebase version identifier(s).
tasks/tools/yaml
Package yamltools contains logic for running tasks for YAML.
Package yamltools contains logic for running tasks for YAML.
tasks/util
Package taskutil contains type definitions and functionality for working with Tasks & Tools across the oscar codebase.
Package taskutil contains type definitions and functionality for working with Tasks & Tools across the oscar codebase.
Package main
Package main

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL