Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor formulae, update 0.1.87, and add CI #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test
on:
workflow_dispatch:
push:
branches: [main]
paths:
- .github/workflows/test.yaml
- ys*.rb

jobs:
Test:
strategy:
matrix:
os:
- macos-13
- macos-latest
- macos-15
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-latest

runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

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

- name: Install Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- name: Tap & Test Formula
run: |
brew tap ${{ github.repository_owner }}/yamlscript
brew style
brew audit --skip-style ys
brew install ys
brew test ys
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Works on Mac and Linux for Intel and ARM.

```
$ brew install yaml/yamlscript/ys
$ brew install yaml/yamlscript/[email protected].86
$ brew install yaml/yamlscript/[email protected].87
```
50 changes: 26 additions & 24 deletions template/ys.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
class CLASS < Formula
version = 'VERSION'

sha_lin_arm = 'LIN_ARM'
sha_lin_int = 'LIN_INT'
sha_mac_arm = 'MAC_ARM'
sha_mac_int = 'MAC_INT'

download = 'https://github.com/yaml/yamlscript/releases/download'

desc "Program in YAML — Code is Data"
homepage "https://github.com/yaml/yamlscript"
version version
homepage "https://yamlscript.org"
version "VERSION"
license "MIT"
repo = "https://github.com/yaml/yamlscript"
head "#{repo}.git", branch: "main"

on_linux do
if Hardware::CPU.arm?
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end

if Hardware::CPU.intel?
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
livecheck do
url :stable
strategy :github_latest
end

sha_mac_arm = "MAC_ARM"
sha_mac_int = "MAC_INT"
sha_lin_arm = "LIN_ARM"
sha_lin_int = "LIN_INT"

download = "#{repo}/releases/download"

on_macos do
if Hardware::CPU.arm?
on_arm do
url "#{download}/#{version}/ys-#{version}-macos-aarch64.tar.xz"
sha256 sha_mac_arm
end

if Hardware::CPU.intel?
on_intel do
url "#{download}/#{version}/ys-#{version}-macos-x64.tar.xz"
sha256 sha_mac_int
end
end
on_linux do
on_arm do
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end
on_intel do
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
end

def install
bin.install "ys"
Expand Down
50 changes: 26 additions & 24 deletions ys.rb
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
class Ys < Formula
version = '0.1.86'

sha_lin_arm = '6a0682546dd3837d9db73624b7d8d0506e9160c5deb10341e3b292afccd30ebb'
sha_lin_int = 'c95cbf3a7a1e1fcf5b3da32152ea4ccf019445ed408e7ca40e1a4dcc824618a7'
sha_mac_arm = '4fd0ee35d9d73e6c7578f05447a977767116419874af38a10f450221409b36ba'
sha_mac_int = 'b028cb93843e0563101b22f36b342f949ac50ed481a95a71c98142a87c46461f'

download = 'https://github.com/yaml/yamlscript/releases/download'

desc "Program in YAML — Code is Data"
homepage "https://github.com/yaml/yamlscript"
version version
homepage "https://yamlscript.org"
version "0.1.87"
license "MIT"
repo = "https://github.com/yaml/yamlscript"
head "#{repo}.git", branch: "main"

on_linux do
if Hardware::CPU.arm?
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end

if Hardware::CPU.intel?
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
livecheck do
url :stable
strategy :github_latest
end

sha_mac_arm = "fd26ff63616287063538c375e7494a0b5f70a679c4f32a72dd2a0e8d4f924492"
sha_mac_int = "ac99a7d205a227dd98ccd2fd4daf391a0a3b471792a9eedcebf1efe616e766eb"
sha_lin_arm = "0afff2004ed79001a6e0bf7adb086a0b20ef994c9a07470b5f4f5ff5617b5e16"
sha_lin_int = "437042ea70b4af3d5c585688c3a80f36ad536165995852b5610e828e8813f0d8"

download = "#{repo}/releases/download"

on_macos do
if Hardware::CPU.arm?
on_arm do
url "#{download}/#{version}/ys-#{version}-macos-aarch64.tar.xz"
sha256 sha_mac_arm
end

if Hardware::CPU.intel?
on_intel do
url "#{download}/#{version}/ys-#{version}-macos-x64.tar.xz"
sha256 sha_mac_int
end
end
on_linux do
on_arm do
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end
on_intel do
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
end

def install
bin.install "ys"
Expand Down
50 changes: 26 additions & 24 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
class YsAT0179 < Formula
version = '0.1.79'

sha_lin_arm = 'a4f9cb4c688cd8b57d0a795721710007911e037dd0be2af6f875a5218bb88acf'
sha_lin_int = '6f4236a618f53b2c5142cb637053134bfb50b466190a9f3eaf33adb9db16284f'
sha_mac_arm = '84eb05aa69a81e3126f45e3436d9e4293979f669b53bf015c5ddd1aedfe7706c'
sha_mac_int = 'c23cba27fe8fc9e12b7d0a5a335b209a2df68a35cc8e020f69cdade6213ce572'

download = 'https://github.com/yaml/yamlscript/releases/download'

desc "Program in YAML — Code is Data"
homepage "https://github.com/yaml/yamlscript"
version version
homepage "https://yamlscript.org"
version "0.1.79"
license "MIT"
repo = "https://github.com/yaml/yamlscript"
head "#{repo}.git", branch: "main"

on_linux do
if Hardware::CPU.arm?
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end

if Hardware::CPU.intel?
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
livecheck do
url :stable
strategy :github_latest
end

sha_mac_arm = "84eb05aa69a81e3126f45e3436d9e4293979f669b53bf015c5ddd1aedfe7706c"
sha_mac_int = "c23cba27fe8fc9e12b7d0a5a335b209a2df68a35cc8e020f69cdade6213ce572"
sha_lin_arm = "a4f9cb4c688cd8b57d0a795721710007911e037dd0be2af6f875a5218bb88acf"
sha_lin_int = "6f4236a618f53b2c5142cb637053134bfb50b466190a9f3eaf33adb9db16284f"

download = "#{repo}/releases/download"

on_macos do
if Hardware::CPU.arm?
on_arm do
url "#{download}/#{version}/ys-#{version}-macos-aarch64.tar.xz"
sha256 sha_mac_arm
end

if Hardware::CPU.intel?
on_intel do
url "#{download}/#{version}/ys-#{version}-macos-x64.tar.xz"
sha256 sha_mac_int
end
end
on_linux do
on_arm do
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end
on_intel do
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
end

def install
bin.install "ys"
Expand Down
50 changes: 26 additions & 24 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
class YsAT0180 < Formula
version = '0.1.80'

sha_lin_arm = 'c3c502e7cb88f48c6609ac1b760b745b566f10f6b404e0f650359f74fcf22c6e'
sha_lin_int = 'd140fbbd537dfe12ac051f744b7f5111cfaf6ad56ccbdd7e0aef99f165812a45'
sha_mac_arm = '1f2a6bbd7dc69661455aad3e84d1b9c7036759c7f9883b5a8f9be3a4d7b6873e'
sha_mac_int = '5f76bdfec67e7b229a2c9a2a791ebb07dc0cea6d96caf7043224c19eb7dbeb52'

download = 'https://github.com/yaml/yamlscript/releases/download'

desc "Program in YAML — Code is Data"
homepage "https://github.com/yaml/yamlscript"
version version
homepage "https://yamlscript.org"
version "0.1.80"
license "MIT"
repo = "https://github.com/yaml/yamlscript"
head "#{repo}.git", branch: "main"

on_linux do
if Hardware::CPU.arm?
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end

if Hardware::CPU.intel?
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
livecheck do
url :stable
strategy :github_latest
end

sha_mac_arm = "1f2a6bbd7dc69661455aad3e84d1b9c7036759c7f9883b5a8f9be3a4d7b6873e"
sha_mac_int = "5f76bdfec67e7b229a2c9a2a791ebb07dc0cea6d96caf7043224c19eb7dbeb52"
sha_lin_arm = "c3c502e7cb88f48c6609ac1b760b745b566f10f6b404e0f650359f74fcf22c6e"
sha_lin_int = "d140fbbd537dfe12ac051f744b7f5111cfaf6ad56ccbdd7e0aef99f165812a45"

download = "#{repo}/releases/download"

on_macos do
if Hardware::CPU.arm?
on_arm do
url "#{download}/#{version}/ys-#{version}-macos-aarch64.tar.xz"
sha256 sha_mac_arm
end

if Hardware::CPU.intel?
on_intel do
url "#{download}/#{version}/ys-#{version}-macos-x64.tar.xz"
sha256 sha_mac_int
end
end
on_linux do
on_arm do
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end
on_intel do
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
end

def install
bin.install "ys"
Expand Down
50 changes: 26 additions & 24 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -1,41 +1,43 @@
class YsAT0181 < Formula
version = '0.1.81'

sha_lin_arm = 'ee7087dad211e8a854309828470922270640ba841f53c7ae58c48b2316c64f7d'
sha_lin_int = 'dc8645f055afcd652a7e371c1bc87da447c90dd88dab1704874757280c8fbea6'
sha_mac_arm = 'd7bbbaeb827f22d9bd50bd798c6eda8b44690add7d929a5036437c2717587eb6'
sha_mac_int = 'e5176cd5e43df2269294e78e4e53657d455531c2fa9063e10a110fb7394e6a4c'

download = 'https://github.com/yaml/yamlscript/releases/download'

desc "Program in YAML — Code is Data"
homepage "https://github.com/yaml/yamlscript"
version version
homepage "https://yamlscript.org"
version "0.1.81"
license "MIT"
repo = "https://github.com/yaml/yamlscript"
head "#{repo}.git", branch: "main"

on_linux do
if Hardware::CPU.arm?
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end

if Hardware::CPU.intel?
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
livecheck do
url :stable
strategy :github_latest
end

sha_mac_arm = "d7bbbaeb827f22d9bd50bd798c6eda8b44690add7d929a5036437c2717587eb6"
sha_mac_int = "e5176cd5e43df2269294e78e4e53657d455531c2fa9063e10a110fb7394e6a4c"
sha_lin_arm = "ee7087dad211e8a854309828470922270640ba841f53c7ae58c48b2316c64f7d"
sha_lin_int = "dc8645f055afcd652a7e371c1bc87da447c90dd88dab1704874757280c8fbea6"

download = "#{repo}/releases/download"

on_macos do
if Hardware::CPU.arm?
on_arm do
url "#{download}/#{version}/ys-#{version}-macos-aarch64.tar.xz"
sha256 sha_mac_arm
end

if Hardware::CPU.intel?
on_intel do
url "#{download}/#{version}/ys-#{version}-macos-x64.tar.xz"
sha256 sha_mac_int
end
end
on_linux do
on_arm do
url "#{download}/#{version}/ys-#{version}-linux-aarch64.tar.xz"
sha256 sha_lin_arm
end
on_intel do
url "#{download}/#{version}/ys-#{version}-linux-x64.tar.xz"
sha256 sha_lin_int
end
end

def install
bin.install "ys"
Expand Down
Loading