Skip to content

Commit

Permalink
build: use tap-new layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Nov 4, 2023
1 parent 4f707e8 commit f575477
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 92 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: brew pr-pull
on:
pull_request_target:
types:
- labeled
jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: ubuntu-22.04
permissions:
contents: write
packages: none
pull-requests: write
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Set up git
uses: Homebrew/actions/git-user-config@master

- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_TOKEN: ${{ github.token }}
HOMEBREW_GITHUB_PACKAGES_USER: ${{ github.actor }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST

- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{ github.token }}
branch: main

- name: Delete branch
if: github.event.pull_request.head.repo.fork == false
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: git push --delete origin $BRANCH
23 changes: 0 additions & 23 deletions .github/workflows/test.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: brew test-bot
on:
push:
branches:
- main
pull_request:
jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v3
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup

- run: brew test-bot --only-tap-syntax

- run: brew test-bot --only-formulae
if: github.event_name == 'pull_request'

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
with:
name: bottles
path: '*.bottle.*'
24 changes: 0 additions & 24 deletions Formula/catwalk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,6 @@ class Catwalk < Formula
depends_on "pkg-config" => :build

Check failure on line 10 in Formula/catwalk.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

FormulaAudit/DependencyOrder: dependency "pkg-config" (line 10) should be put before dependency "rust" (line 11)
depends_on "webp" => :build

on_macos do
on_intel do
url "https://github.com/catppuccin/toolbox/releases/download/catwalk-v1.2.0/catwalk-x86_64-apple-darwin"
sha256 "d5d918a23424cef7c07f4e41408671d7f88bed3ba1f352b620ef7fcef4396983"

def install
bin.install "catwalk-x86_64-apple-darwin" => "catwalk"
generate_completions_from_executable(bin/"catwalk", "completion")
end
end
end

on_linux do
on_intel do
url "https://github.com/catppuccin/toolbox/releases/download/catwalk-v1.2.0/catwalk-x86_64-unknown-linux-gnu"
sha256 "413459bb5cd6bd937c49bf9a6c10ab164bd05b1a7c09c2a0c2dac9a841fb9b06"

def install
bin.install "catwalk-x86_64-unknown-linux-gnu" => "catwalk"
generate_completions_from_executable(bin/"catwalk", "completion")
end
end
end

def install
system "cargo", "install", *std_cargo_args(path: "catwalk")
generate_completions_from_executable(bin/"catwalk", "completion")
Expand Down
22 changes: 0 additions & 22 deletions Formula/mdbook-catppuccin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ class MdbookCatppuccin < Formula

depends_on "rust" => :build

on_macos do
on_intel do
url "https://github.com/catppuccin/mdBook/releases/download/v2.0.1/mdbook-catppuccin-x86_64-apple-darwin.tar.gz"
sha256 "ce2c10b5bee597d5ce063796b410d8841b23c94f7c548a515e9bd22cc31c4a75"

def install
bin.install "mdbook-catppuccin-x86_64-apple-darwin" => "mdbook-catppuccin"
end
end
end

on_linux do
on_intel do
url "https://github.com/catppuccin/mdBook/releases/download/v2.0.1/mdbook-catppuccin-x86_64-unknown-linux-gnu.tar.gz"
sha256 "38abdc0998402d975485757b2477dd9d5ad736f67706872988e890d0d641c6c9"

def install
bin.install "mdbook-catppuccin-x86_64-unknown-linux-gnu" => "mdbook-catppuccin"
end
end
end

def install
system "cargo", "install", *std_cargo_args
end
Expand Down
24 changes: 1 addition & 23 deletions Formula/whiskers.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Whiskers < Formula
desc "A sweet program that takes in four showcase images and displays them all at once."
desc "Soothing port creation tool for the high-spirited!"
homepage "https://github.com/catppuccin/toolbox/tree/main/whiskers"
url "https://github.com/catppuccin/toolbox/archive/refs/tags/whiskers-v1.1.1.tar.gz"
sha256 "baae7de466b48a808f25ef87f7dc94765c67ddda656d4b2813a19012580b00af"
Expand All @@ -8,28 +8,6 @@ class Whiskers < Formula

depends_on "rust" => :build

on_macos do
on_intel do
url "https://github.com/catppuccin/toolbox/releases/download/whiskers-v1.1.1/whiskers-x86_64-apple-darwin"
sha256 "f29d9c165d8bc7d5ae4fecd6bbd534c93d4155bf941b0c8624813b0e75e4fcde"

def install
bin.install "whiskers-x86_64-apple-darwin" => "whiskers"
end
end
end

on_linux do
on_intel do
url "https://github.com/catppuccin/toolbox/releases/download/whiskers-v1.1.1/whiskers-x86_64-unknown-linux-gnu"
sha256 "2940e5707bec2da0384d713bfb62bf905be3c891c502a3037554073d6f9e0e99"

def install
bin.install "whiskers-x86_64-unknown-linux-gnu" => "whiskers"
end
end
end

def install
system "cargo", "install", *std_cargo_args(path: "whiskers")
end
Expand Down

0 comments on commit f575477

Please sign in to comment.