build: UPX compression — binary 6.9MB → 2.1MB (70% smaller)
UPX with --best --lzma compresses the Go binary for distribution. Integrated into Makefile targets (fallback if upx not installed).
This commit is contained in:
parent
c64f12a360
commit
67d9a6a7d8
3 changed files with 4 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -10,3 +10,4 @@ Thumbs.db
|
||||||
notes/
|
notes/
|
||||||
wallarm
|
wallarm
|
||||||
bin/
|
bin/
|
||||||
|
wallarm-upx
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -12,9 +12,11 @@ all: linux-amd64 linux-arm64
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(BINARY)-linux-amd64 ./cmd/wallarm/
|
GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $(BINARY)-linux-amd64 ./cmd/wallarm/
|
||||||
|
upx --best --lzma $(BINARY)-linux-amd64 -o $(BINARY)-linux-amd64.tmp 2>/dev/null && mv $(BINARY)-linux-amd64.tmp $(BINARY)-linux-amd64 || true
|
||||||
|
|
||||||
linux-arm64:
|
linux-arm64:
|
||||||
GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(BINARY)-linux-arm64 ./cmd/wallarm/
|
GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o $(BINARY)-linux-arm64 ./cmd/wallarm/
|
||||||
|
upx --best --lzma $(BINARY)-linux-arm64 -o $(BINARY)-linux-arm64.tmp 2>/dev/null && mv $(BINARY)-linux-arm64.tmp $(BINARY)-linux-arm64 || true
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BINARY) $(BINARY)-linux-*
|
rm -f $(BINARY) $(BINARY)-linux-*
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ That's it. The binary runs preflight checks, then opens an interactive TUI:
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Single binary** — 7MB, zero runtime dependencies, works on any Linux
|
- **Single binary** — 2MB, zero runtime dependencies, works on any Linux
|
||||||
- **Interactive TUI** — bubbletea-powered forms and dashboard
|
- **Interactive TUI** — bubbletea-powered forms and dashboard
|
||||||
- **Preflight checks** — runs on every start: system, network, cloud reachability, resources
|
- **Preflight checks** — runs on every start: system, network, cloud reachability, resources
|
||||||
- **Multi-node** — manage multiple Wallarm nodes on the same host via systemd
|
- **Multi-node** — manage multiple Wallarm nodes on the same host via systemd
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue