Release 3.8.2.1: reliability, UI probe/logs, CI, signing gates.
Clear sysproxy on core death; probe+reconnect; subscription prune; Best ignores soft UDP; Windows tray; Android protocol gate; CI workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+23
-4
@@ -176,22 +176,41 @@ func writeAppBundle(appRoot, binPath, version, bundleVersion, arch string) error
|
||||
|
||||
func signAppBundle(appRoot string) error {
|
||||
if _, err := exec.LookPath("codesign"); err != nil {
|
||||
if os.Getenv("REQUIRE_CODESIGN") == "1" {
|
||||
return fmt.Errorf("codesign required (REQUIRE_CODESIGN=1) but not found")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// NAVIS_CODESIGN_IDENTITY=Developer ID Application: … for release; default ad-hoc "-".
|
||||
identity := strings.TrimSpace(os.Getenv("NAVIS_CODESIGN_IDENTITY"))
|
||||
require := os.Getenv("REQUIRE_CODESIGN") == "1"
|
||||
if require && (identity == "" || identity == "-") {
|
||||
return fmt.Errorf("REQUIRE_CODESIGN=1 requires NAVIS_CODESIGN_IDENTITY")
|
||||
}
|
||||
if identity == "" {
|
||||
identity = "-"
|
||||
}
|
||||
cmd := exec.Command("codesign", "-s", identity, "--force", "--deep", "--options", "runtime", appRoot)
|
||||
args := []string{"-s", identity, "--force", "--deep"}
|
||||
if identity != "-" {
|
||||
args = append(args, "--options", "runtime", "--timestamp")
|
||||
}
|
||||
args = append(args, appRoot)
|
||||
cmd := exec.Command("codesign", args...)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
cmd = exec.Command("codesign", "-s", identity, "--force", "--deep", appRoot)
|
||||
out, err = cmd.CombinedOutput()
|
||||
if identity == "-" {
|
||||
cmd = exec.Command("codesign", "-s", "-", "--force", "--deep", appRoot)
|
||||
out, err = cmd.CombinedOutput()
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("codesign %s: %w: %s", appRoot, err, strings.TrimSpace(string(out)))
|
||||
}
|
||||
}
|
||||
if identity != "-" {
|
||||
v := exec.Command("codesign", "--verify", "--deep", "--strict", appRoot)
|
||||
if out, err := v.CombinedOutput(); err != nil {
|
||||
return fmt.Errorf("codesign verify: %w: %s", err, strings.TrimSpace(string(out)))
|
||||
}
|
||||
}
|
||||
_ = exec.Command("xattr", "-cr", appRoot).Run()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user