-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJustfile
More file actions
86 lines (67 loc) · 1.72 KB
/
Justfile
File metadata and controls
86 lines (67 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
PROJECT_NAME := "daonb-webexec"
# Default recipe - show available commands
default:
@just --list
# Install Go dependencies
install:
go mod download
go mod verify
# Build the webexec binary
build:
go generate .
go build -o webexec .
# Run all tests with race detector
test:
go test -v -race ./...
# Run a specific test
test-single TEST:
go test -v -race -run {{TEST}} ./...
# Run linting and formatting
lint:
go fmt ./...
go vet ./...
# Clean build artifacts
clean:
rm -f webexec
rm -f xversion.go
rm -rf dist
# Install system dependencies (for container bootstrap)
bootstrap:
@echo "Installing system dependencies..."
# Go is already installed in the base image
# Install any additional tools if needed
# Run the webexec agent in debug mode
run:
go run . start --debug
# Run integration tests
test-integration:
go test -v -tags=integration ./...
# Generate version information
generate:
go generate .
# Build release binaries using goreleaser
build-release:
goreleaser build --snapshot --clean
# Show current status
status:
./webexec status || echo "webexec not running or not built"
# Initialize webexec configuration
init:
./webexec init
# Start webexec agent
start:
./webexec start
# Stop webexec agent
stop:
./webexec stop
# Restart webexec agent
restart:
./webexec restart
# Build the sandbox container
build-sandbox:
podman machine init --disk-size 30 >/dev/null 2>&1 || true
podman machine start >/dev/null 2>&1 || true
podman build -t localhost/asimi-sandbox-{{PROJECT_NAME}}:latest -f .agents/sandbox/Dockerfile .
# Clean up the sandbox container
clean-sandbox:
podman rmi localhost/asimi-sandbox-{{PROJECT_NAME}}:latest