Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
6 changes: 3 additions & 3 deletions v3/internal/commands/build_assets/darwin/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ tasks:
GOOS: darwin
CGO_ENABLED: 1
GOARCH: '{{.ARCH | default ARCH}}'
CGO_CFLAGS: "-mmacosx-version-min=10.15"
CGO_LDFLAGS: "-mmacosx-version-min=10.15"
MACOSX_DEPLOYMENT_TARGET: "10.15"
CGO_CFLAGS: "-mmacosx-version-min=12.0"
CGO_LDFLAGS: "-mmacosx-version-min=12.0"
MACOSX_DEPLOYMENT_TARGET: "12.0"

build:docker:
summary: Cross-compiles for macOS using Docker (for Linux/Windows hosts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<string>{{.CFBundleIconName}}</string>
{{- end}}
<key>LSMinimumSystemVersion</key>
<string>10.15.0</string>
<string>12.0</string>

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.

Suggested change
<string>12.0</string>
<string>12.0.0</string>

Copilot uses AI. Check for mistakes.
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<string>{{.CFBundleIconName}}</string>
{{- end}}
<key>LSMinimumSystemVersion</key>
<string>10.15.0</string>
<string>12.0</string>

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.

Suggested change
<string>12.0</string>
<string>12.0.0</string>

Copilot uses AI. Check for mistakes.
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
Expand Down
74 changes: 74 additions & 0 deletions v3/test/5161/darwin_min_version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package test

import (
"os"
"path/filepath"
"strings"
"testing"

"howett.net/plist"
)

func TestDarwinInfoPlistMinVersion(t *testing.T) {
templates := []string{
"../../internal/commands/updatable_build_assets/darwin/Info.plist.tmpl",
"../../internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl",
}

expectedVersion := "12.0"

for _, tmpl := range templates {
t.Run(filepath.Base(tmpl), func(t *testing.T) {
data, err := os.ReadFile(tmpl)
if err != nil {
t.Fatalf("Failed to read template: %v", err)
}

content := string(data)

if !strings.Contains(content, expectedVersion) {
t.Errorf("Template %s does not contain expected minimum version %s", tmpl, expectedVersion)
}

if strings.Contains(content, "10.15") {
t.Errorf("Template %s still contains outdated 10.15 version", tmpl)
}

var plistDict map[string]any
_, err = plist.Unmarshal(data, &plistDict)
if err == nil {
minVer, ok := plistDict["LSMinimumSystemVersion"]
if ok && minVer != expectedVersion {
t.Errorf("LSMinimumSystemVersion = %v, want %s", minVer, expectedVersion)
}
}
Comment thread
leaanthony marked this conversation as resolved.
Outdated
})
}
}

func TestDarwinTaskfileMinVersion(t *testing.T) {
taskfile := "../../internal/commands/build_assets/darwin/Taskfile.yml"

data, err := os.ReadFile(taskfile)
if err != nil {
t.Fatalf("Failed to read Taskfile: %v", err)
}

content := string(data)

if strings.Contains(content, "10.15") {
t.Errorf("Taskfile still contains outdated 10.15 version")
}

if !strings.Contains(content, "12.0") {
t.Errorf("Taskfile does not contain expected minimum version 12.0")
}

if !strings.Contains(content, "-mmacosx-version-min=12.0") {
t.Errorf("Taskfile CGO flags not updated to 12.0")
}

if !strings.Contains(content, `MACOSX_DEPLOYMENT_TARGET: "12.0"`) {
t.Errorf("Taskfile MACOSX_DEPLOYMENT_TARGET not updated to 12.0")
}
}
Loading