Initial commit: AetherForge Linux (forge-mesh) v0.1.0-dev
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
This commit is contained in:
54
Makefile
Normal file
54
Makefile
Normal file
@@ -0,0 +1,54 @@
|
||||
.PHONY: server agent forge run tidy build test test-frontend all web-deck deck install-agent
|
||||
|
||||
GO := /opt/go/bin/go
|
||||
export GOROOT := /opt/go
|
||||
export PATH := /opt/go/bin:$(PATH)
|
||||
|
||||
BINARY := bin/forge-mesh-server
|
||||
AGENT := bin/forge-mesh-agent
|
||||
FORGE := bin/forge-mesh-forge
|
||||
CONFIG := data/config.json
|
||||
|
||||
web-deck:
|
||||
cd web && npm install && npm run build
|
||||
./scripts/sync-webroot.sh
|
||||
|
||||
deck: web-deck server
|
||||
|
||||
server:
|
||||
@mkdir -p bin
|
||||
$(GO) build -o $(BINARY) ./cmd/server
|
||||
|
||||
agent:
|
||||
@mkdir -p bin
|
||||
$(GO) build -o $(AGENT) ./cmd/agent
|
||||
|
||||
forge:
|
||||
@mkdir -p bin
|
||||
$(GO) build -o $(FORGE) ./cmd/forge
|
||||
|
||||
all: server agent forge
|
||||
|
||||
install-agent: agent
|
||||
sudo mkdir -p /opt/forge-mesh
|
||||
sudo install -m 0755 $(AGENT) /opt/forge-mesh/agent
|
||||
@echo "Installed dev agent to /opt/forge-mesh/agent"
|
||||
@echo "Run: FORGE_MESH_FLEET_SECRET=change-me-fleet-secret /opt/forge-mesh/agent -deck-url http://127.0.0.1:8989"
|
||||
|
||||
run: server
|
||||
./$(BINARY) -config $(CONFIG)
|
||||
|
||||
tidy:
|
||||
$(GO) mod tidy
|
||||
|
||||
build:
|
||||
$(GO) build ./...
|
||||
|
||||
test:
|
||||
$(GO) test ./...
|
||||
|
||||
test-frontend:
|
||||
cd web && npm run test
|
||||
|
||||
e2e:
|
||||
./scripts/e2e-test.sh
|
||||
Reference in New Issue
Block a user