对命令行二进制文件(stdin、stdout 等,无窗口或图标)进行强化、代码签名、公证、打包等最合适的方法是什么,以允许将二进制文件分发给 macOS Catalina 用户,因此他们可以以最少的痛苦/麻烦来运行该实用程序吗?
假设 GateKeeper 等的默认/库存操作系统配置。
假设用户当前很可能没有安装从源代码进行编译的工具或技能。
假设运行该实用程序时弹出的终端窗口不会吓到他们。
旧答案(2020):
我已经开始使用https://github.com/mitchellh/gon https://github.com/mitchellh/gon最近,我对此感到非常高兴。来自 Vagrant、Terraform、Packer 等的制造商。
更新答案(2022):
此时 Gon 几乎已经放弃软件了,这令人失望。不过,此后苹果也发布了notarytool https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution,它基本上做了 Gon 所做的事情。
I use 去发布器 https://goreleaser.com对于发布,这是我的公证步骤.goreleaser.yml
文件。 (您应该能够很容易地将其转换回标准 shell 命令。)
signs:
- id: gatekeeper
ids:
- macos-archive
signature: "${artifact}"
cmd: xcrun
args:
[
"notarytool",
"submit",
"./dist/{{ .ProjectName }}-{{ .Version }}.darwin.universal.zip",
"--apple-id",
"{{ .Env.AC_APPLE_ID }}",
"--password",
"{{ .Env.AC_PASSWORD }}",
"--team-id",
"{{ .Env.AC_TEAM_ID }}",
"--progress",
"--wait",
]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)