mirror of
https://github.com/MobAI-App/simslim.git
synced 2026-10-05 22:35:33 +02:00
The repo root becomes `package simslim`, an importable library holding every piece of slimming logic; the CLI moves to `cmd/simslim`. Previously everything was `package main`, so nothing here could be imported at all. The library carries no external dependencies — urfave/cli stays on the CLI side, along with all terminal-facing code: the interactive profile wizard, writeJSON, truncate/humanBytes, fatal and usage. The library never writes to stdout; it returns values and reports progress through the Reporter callback. Renames forced by collisions with existing types: status() -> ReadStatus, statusForDevice() -> ReadStatusForDevice, diskCleanupPlan() -> PlanDiskCleanup. The shutdown/boot timeouts move to simctl.go as ShutdownTimeout/BootTimeout. `go install` gains a path element: github.com/mobai-app/simslim/cmd/simslim. The installed binary is still named simslim, and -X main.version still applies. packaging/homebrew/simslim.rb.in is updated to match, since std_go_args passes no package path. Verified live against a real simulator: list, profiles, status, doctor, size, disk-plan, measure, boot, shutdown, on, off, on --except, on --profile, clone, rename, delete and the interactive wizard all behave identically to the previous build. JSON output, human output, help text and exit codes are unchanged.
23 lines
436 B
Makefile
23 lines
436 B
Makefile
.PHONY: app cli check format test
|
|
|
|
VERSION ?= $(shell git describe --tags --always --dirty)
|
|
|
|
cli:
|
|
go build -ldflags "-X main.version=$(VERSION)" -o simslim ./cmd/simslim
|
|
|
|
app:
|
|
./scripts/build-app.sh
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
check: test
|
|
go vet ./...
|
|
xcrun swift-format lint --strict --recursive gui
|
|
zsh -n scripts/build-app.sh
|
|
plutil -lint gui/Info.plist
|
|
|
|
format:
|
|
gofmt -w *.go
|
|
xcrun swift-format format --in-place --recursive gui
|