Project

bruh

0.0
The project is in a healthy, maintained state
A tool for automating the release process of Haskell packages to Hackage and Homebrew
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

~> 2.6
~> 2.0
~> 1.2
~> 2.2
~> 0.23
 Project Readme

Bruh

Bruh is a Ruby gem that automates the release process for Haskell packages to both Hackage and Homebrew. It streamlines the workflow of releasing Haskell packages by handling version updates, changelog management, Hackage publishing, and Homebrew formula updates.

Features

  • Cabal Integration: Parse and update Cabal files with version bumps
  • Changelog Management: Auto-update CHANGELOG.md with new version entries
  • Hackage Publishing: Publish packages to Hackage with documentation
  • Homebrew Formula Generation: Update Homebrew formulas with new versions and SHAs
  • Bottle Building: Build and publish Homebrew bottles to GitHub
  • Non-interactive Mode: Support for CI/CD pipelines and automated testing

Installation

Install the gem by executing:

gem install bruh

Usage

Command Line Interface

The primary interface is through the bruh command:

# Interactive release process
bruh release

# Non-interactive release with specific version
bruh release --non-interactive --version 0.1.2

# Skip specific steps
bruh release --skip-hackage --skip-bottles

# Show version
bruh version

Non-interactive Release Script

For CI/CD pipelines, you can use the included release script:

# Basic usage
bin/release --version 0.1.2

# Skip specific steps
bin/release --version 0.1.2 --skip-hackage --skip-bottles

# Run in interactive mode
bin/release --interactive

Configuration

Bruh stores configuration in ~/.config/bruh/config.toml. For non-interactive usage, you should set up your Hackage credentials:

# Setup credentials
bruh config setup

# Manually set credentials
bruh config set hackage_username "your-username"
bruh config set hackage_password "your-password"
bruh config set github_token "your-token"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt.

Running Tests

# Run all tests
bundle exec rake test

# Run a specific test
bundle exec ruby -I lib:test test/test_cabal.rb -n test_name

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -am 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.