diff options
author | Fly me to the moon <git@bigly.dog> | 2021-10-03 07:23:27 -0700 |
---|---|---|
committer | Fly me to the moon <git@bigly.dog> | 2021-10-03 07:23:27 -0700 |
commit | 46a0a30e361420e1d56828d7369473c216c0e3a4 (patch) | |
tree | c1b658dc2c3155a7f4e4194b611be433f8944c4b /ci | |
parent | 65518ec6708d92bbb95d55e73253716ceab32979 (diff) |
with macos uri
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/release.py | 6 | ||||
-rw-r--r-- | ci/templates/homebrew.rb.j2 | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/ci/release.py b/ci/release.py index 260da48..432ff0a 100755 --- a/ci/release.py +++ b/ci/release.py @@ -129,13 +129,15 @@ def _sha(uri: str) -> str: def _template(project: _Project) -> None: prefix = f"{project.repo}/releases/download/{project.tag}" + aarch64_uri = f"{prefix}/aarch64-apple-darwin" x86_uri = f"{prefix}/x86_64-apple-darwin.zip" - # aarch64_uri = f"{prefix}/aarch64-apple-darwin" + aarch64_sha = _sha(aarch64_uri) x86_sha = _sha(x86_uri) - # aarch64_sha = _sha(aarch64_uri) vals = { **asdict(project), + "aarch64_uri": aarch64_uri, + "aarch64_sha": aarch64_sha, "x86_sha": x86_sha, "x86_uri": x86_uri, } diff --git a/ci/templates/homebrew.rb.j2 b/ci/templates/homebrew.rb.j2 index a958376..dfa5754 100644 --- a/ci/templates/homebrew.rb.j2 +++ b/ci/templates/homebrew.rb.j2 @@ -4,8 +4,15 @@ class Sad < Formula version "{{ version }}" bottle :unneeded - url "{{ x86_uri }}" - sha256 "{{ x86_sha }}" + if Hardware::CPU.arm? + url "{{ aarch64_uri }}" + sha256 "{{ aarch64_sha }}" + end + + if Hardware::CPU.intel? + url "{{ x86_uri }}" + sha256 "{{ x86_sha }}" + end depends_on "fzf" depends_on "git-delta" |