From 3ffdd6328b9f97e89381ed036dfc62e6035ffae4 Mon Sep 17 00:00:00 2001 From: blacktop Date: Tue, 5 May 2026 15:36:59 -0600 Subject: [PATCH] fix(sb): build info --- Makefile | 19 ++++++++++++++----- hack/make/docs | 10 ++++++++++ www/docs/getting-started/building.md | 16 ---------------- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 2df7c6347..eefc35cab 100644 --- a/Makefile +++ b/Makefile @@ -28,18 +28,27 @@ x86-brew: ## Install the x86_64 homebrew on Apple Silicon .PHONY: setup setup: build-deps dev-deps ## Install all the build and dev dependencies +.PHONY: _require-sandbox +_require-sandbox: + @test -d pkg/sandbox || { \ + echo "ERROR: pkg/sandbox/ is closed-source and not present in public clones."; \ + echo " Targets requiring it: snapshot, dry_release, release, release-minor, docs."; \ + echo " Public users: use 'make build' or 'go build ./cmd/ipsw'."; \ + exit 1; \ + } + .PHONY: dry_release -dry_release: ## Run goreleaser without releasing/pushing artifacts to github +dry_release: _require-sandbox ## Run goreleaser without releasing/pushing artifacts to github @echo " > Creating Pre-release Build ${NEXT_VERSION}" @GOROOT=$(shell go env GOROOT) goreleaser build --id darwin_extras_build --clean --timeout 60m --snapshot --single-target --output dist/ipsw .PHONY: snapshot -snapshot: ## Run goreleaser snapshot +snapshot: _require-sandbox ## Run goreleaser snapshot @echo " > Creating Snapshot ${NEXT_VERSION}" @GOROOT=$(shell go env GOROOT) goreleaser --clean --timeout 60m --snapshot .PHONY: release -release: ## Create a new release from the NEXT_VERSION +release: _require-sandbox ## Create a new release from the NEXT_VERSION @echo " > Creating Release ${NEXT_VERSION}" @hack/make/release ${NEXT_VERSION} @GOROOT=$(shell go env GOROOT) goreleaser --clean --timeout 60m --skip=validate @@ -47,7 +56,7 @@ release: ## Create a new release from the NEXT_VERSION @hack/make/portfile ../ports .PHONY: release-minor -release-minor: ## Create a new minor semver release +release-minor: _require-sandbox ## Create a new minor semver release @echo " > Creating Release $(shell go tool svu --tag.pattern 'v3.1.*' minor)" @hack/make/release $(shell go tool svu --tag.pattern 'v3.1.*' minor) @GOROOT=$(shell go env GOROOT) goreleaser --clean --timeout 60m --skip=validate @@ -80,7 +89,7 @@ build-linux: ## Build ipsw (linux) @CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w --X github.com/blacktop/ipsw/api/types.BuildVersion=$(CUR_VERSION) -X github.com/blacktop/ipsw/api/types.BuildTime=$(date -u +%Y%m%d)" ./cmd/ipswd .PHONY: docs -docs: ## Build the cli docs +docs: _require-sandbox ## Build the cli docs @echo " > Updating CLI Docs" go generate ./... hack/make/docs diff --git a/hack/make/docs b/hack/make/docs index 5fecf9154..715bf5236 100755 --- a/hack/make/docs +++ b/hack/make/docs @@ -16,6 +16,15 @@ This script generates markdown docs from cli. exit fi +require_sandbox() { + if [[ ! -d pkg/sandbox ]]; then + echo "ERROR: pkg/sandbox/ is closed-source and not present in public clones." >&2 + echo " CLI doc generation requires the sandbox command sources." >&2 + echo " Public users should use the committed docs instead of regenerating them." >&2 + exit 1 + fi +} + move_swagger() { if [[ -f api/swagger.json ]]; then cp api/swagger.json www/static/api/swagger.json @@ -23,6 +32,7 @@ move_swagger() { } main() { + require_sandbox move_swagger SED="sed" diff --git a/www/docs/getting-started/building.md b/www/docs/getting-started/building.md index 6f7d4200d..762d8d273 100644 --- a/www/docs/getting-started/building.md +++ b/www/docs/getting-started/building.md @@ -35,22 +35,6 @@ cd ipsw make build ``` -## Build for all supported platforms using [goreleaser](https://goreleaser.com) and [zig](https://ziglang.org) - -Get *goreleaser* and *zig* - -```bash -brew install goreleaser zig unicorn libusb -``` - -Build for all supported platforms - -```bash -git clone https://github.com/blacktop/ipsw.git -cd ipsw -make snapshot -``` - :::info offline ### To dev and build *WITHOUT* internet