GoReleaser cross-compiles darwin/arm64 binaries on ubuntu-latest with no codesign step. macOS 11+ on Apple Silicon requires at least an ad-hoc signature; unsigned arm64 binaries are SIGKILL'd by amfid on first exec, which surfaces as `signal: killed` and aborts `dws upgrade` at the "解压并验证" step. Two layers of fix: 1. Release-side: post-goreleaser.sh now unpacks each dws-darwin-*.tar.gz, applies an ad-hoc signature (codesign locally, rcodesign in CI), deterministically repacks, and rewrites the matching line in checksums.txt. release.yml installs rcodesign 0.27.0 before GoReleaser runs. 2. Client-side self-heal: validateNewBinary detects `signal: killed` on darwin and retries once after running `codesign --force --sign -` and clearing com.apple.quarantine. Future releases stay functional even if the signing step is ever skipped. Verified end-to-end: stripped a real dws binary → exec exits 137 → validateNewBinary recovers → final binary shows Signature=adhoc and runs.
Go Bootstrap Scripts
These repo-local entrypoints are the supported shell entrypoints for building, testing, packaging, and policy checks.
make build: build thedwsCLI fromcmdmake test: rungo test ./...make lint: run formatting checks and requiredgolangci-lintmake fmt: format Go source files undercmd/,internal/, andtest/make package: build all release artifacts locally viagoreleaser --snapshotmake release: build and publish a release viagoreleaser
Script groups:
- Root installers:
./scripts/install.sh,./scripts/install.ps1,./scripts/install-skills.sh - Dev helpers:
./scripts/dev/build.sh,./scripts/dev/lint.sh,./scripts/dev/ci-local.sh,./scripts/dev/run-mock-e2e.sh,./scripts/dev/coverage.sh - Policy checks:
./scripts/policy/check-generated-drift.sh,./scripts/policy/check-command-surface.sh,./scripts/policy/check-open-source-assets.sh - Release helpers:
./scripts/release/post-goreleaser.sh,./scripts/release/verify-package-managers.sh,./scripts/release/publish-homebrew-formula.sh