mirror of
https://github.com/blacktop/ipsw.git
synced 2026-05-08 12:22:26 +00:00
fix(sb): build info
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user