install.sh: an interactive installer — user, address, HTTPS, firewall, password — that still runs unattended; make publish
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
a838adcb27
commit
e75fa0d759
@@ -9,7 +9,7 @@ LDFLAGS = -s -w -X main.version=$(VERSION)
|
||||
# static, no cgo: the same file runs on glibc, musl (Alpine) and anything else with a Linux kernel
|
||||
GOBUILD = CGO_ENABLED=0 GOOS=linux GOARM=6 $(GO) build -trimpath -ldflags "$(LDFLAGS)"
|
||||
|
||||
.PHONY: all web build go dev cross release deploy push-nodes push-nodes-force test clean
|
||||
.PHONY: all web build go dev cross release publish deploy push-nodes push-nodes-force test clean
|
||||
|
||||
all: build
|
||||
|
||||
@@ -42,6 +42,7 @@ release: web
|
||||
@for a in $(ARCHES); do \
|
||||
echo "build linux/$$a"; GOARCH=$$a $(GOBUILD) -o dist/hamlab-linux-$$a ./cmd/hamlab || exit 1; done
|
||||
sed 's|@VERSION@|$(VERSION)|' install.sh > dist/install.sh && chmod +x dist/install.sh
|
||||
echo $(VERSION) > dist/VERSION
|
||||
cd dist && sha256sum hamlab-linux-* install.sh > SHA256SUMS
|
||||
|
||||
test:
|
||||
@@ -63,3 +64,14 @@ push-nodes-force:
|
||||
|
||||
clean:
|
||||
rm -rf bin dist internal/web/dist web/dist
|
||||
|
||||
# Put the release where `curl -fsSL https://hamlab-demo.bigham.dev/install.sh | sh` finds it:
|
||||
# the static site beside the demo page (nginx, public through NPM). Binaries first, VERSION
|
||||
# last, so nobody is ever pointed at files that aren't there yet.
|
||||
PUBLISH ?= /home/core/apps/hamlab-demo/site
|
||||
publish: release
|
||||
mkdir -p $(PUBLISH)/dl
|
||||
cp dist/hamlab-linux-* dist/SHA256SUMS $(PUBLISH)/dl/
|
||||
cp dist/install.sh $(PUBLISH)/dl/install.sh && cp dist/install.sh $(PUBLISH)/install.sh
|
||||
cp dist/VERSION $(PUBLISH)/dl/VERSION
|
||||
@echo "published $(VERSION): curl -fsSL https://hamlab-demo.bigham.dev/install.sh | sh"
|
||||
|
||||
Reference in New Issue
Block a user