Skip to content

Commit

Permalink
feat: revive repo, update & add packages (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Nov 4, 2023
1 parent 31b68f6 commit 9b8776b
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Brew Install & Test

on:
push:
branches: [main]
pull_request:

jobs:
install-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- run: |
brew install --formula ./Formula/*.rb
- run: |
brew test ./Formula/*.rb
45 changes: 45 additions & 0 deletions Formula/catwalk.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
class Catwalk < Formula
desc "A sweet program that takes in four showcase images and displays them all at once."
homepage "https://github.com/catppuccin/toolbox/tree/main/catwalk"
url "https://github.com/catppuccin/toolbox/archive/refs/tags/catwalk-v1.2.0.tar.gz"
sha256 "79b8f28432a97d20c99d8e6015fcc7e459c05e5932a07e693cf05231e6e9be05"
license "MIT"
head "https://github.com/catppuccin/toolbox.git", branch: "main"

depends_on "rust" => :build
depends_on "pkg-config" => :build
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")
end

test do
assert_predicate (bin/"catwalk"), :exist?
end
end
25 changes: 19 additions & 6 deletions Formula/mdbook-catppuccin.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
class MdbookCatppuccin < Formula
desc "🎊 Soothing pastel theme for mdBook"
homepage "https://github.com/catppuccin/mdBook"
url "https://github.com/catppuccin/mdBook/archive/refs/tags/v2.0.1.tar.gz"
sha256 "75062a0e4561d0b067c8b200ba4fc7eb66df59e15e568de08bcf800ab76c8781"
license "MIT"
head "https://github.com/catppuccin/mdbook.git", branch: "main"

depends_on "rust" => :build

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

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

on_linux do
url "https://github.com/catppuccin/mdBook/releases/download/v0.1.1/mdbook-catppuccin-x86_64-unknown-linux-gnu.tar.gz"
sha256 "9e6cd573de0afdb4838ab71a3d23db4cf29a3d51468cba60579819ed11c15c11"
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"

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

def install
bin.install "mdbook-catppuccin"
system "cargo", "install", *std_cargo_args
end

test do
Expand All @@ -24,6 +37,6 @@ def install

assert_predicate (testpath/"theme/index.hbs"), :exist?
assert_predicate (testpath/"theme/catppuccin.css"), :exist?
assert_predicate (testpath/"theme/catppuccin-highlight.css"), :exist?
assert_predicate (testpath/"theme/catppuccin-admonish.css"), :exist?
end
end
40 changes: 40 additions & 0 deletions Formula/whiskers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
class Whiskers < Formula
desc "A sweet program that takes in four showcase images and displays them all at once."
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"
license "MIT"
head "https://github.com/catppuccin/toolbox.git", branch: "main"

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

test do
assert_predicate (bin/"catwalk"), :exist?
end
end

0 comments on commit 9b8776b

Please sign in to comment.