From 89f9fe0a337285d2c879aeb9cfd855e712700b8d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 1 Dec 2024 03:11:53 +0000 Subject: [PATCH] fix(casks/template): correct artifact detection --- templates/_helpers.tpl | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index bda42a4e..414924cf 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -1,27 +1,20 @@ {{ define "sources" -}} -{{ $arm64SHA := (.SHA256 "macOS-13" "arm64") -}} -{{ $arm64URL := (.DownloadURL "macOS-13" "arm64") -}} -{{ $x86_64SHA := (.SHA256 "macOS-12" "x86_64") -}} -{{ $x86_64URL := (.DownloadURL "macOS-12" "x86_64") -}} -{{ if (and (ne $arm64URL "") (ne $x86_64URL "")) }} +{{ $arm64SHA := (.SHA256 "macOS-11" "arm64") -}} +{{ $arm64URL := (.DownloadURL "macOS-11" "arm64") -}} +{{ $x86_64SHA := (.SHA256 "macOS-11" "x86_64") -}} +{{ $x86_64URL := (.DownloadURL "macOS-11" "x86_64") -}} +{{- if ne $arm64URL "" }} on_arm do sha256 '{{ $arm64SHA }}' url '{{ $arm64URL }}' depends_on macos: '>= :big_sur' end - +{{- end }} +{{- if ne $x86_64URL "" }} on_intel do sha256 '{{ $x86_64SHA }}' url '{{ $x86_64URL }}' depends_on macos: '>= :big_sur' end -{{- else if ne $arm64URL "" }} - sha256 '{{ $arm64SHA }}' - url '{{ $arm64URL }}' - depends_on macos: '>= :big_sur', arch: :arm64 -{{- else }} - sha256 '{{ $x86_64SHA }}' - url '{{ $x86_64URL }}' - depends_on macos: '>= :big_sur' {{- end }} {{- end -}}