|
|
|
#!/bin/bash
|
|
|
|
echo "Purging old builds"
|
|
|
|
rm -v bin/* 2>/dev/null
|
|
|
|
|
|
|
|
echo "Removing Logs"
|
|
|
|
rm -v bin/log/* 2>/dev/null
|
|
|
|
|
|
|
|
echo "Building reactor binaries"
|
|
|
|
env GOOS=linux GOARCH=arm GOARM=7 go build -o bin/reactor_linux_arm cmd/reactor/main.go
|
|
|
|
env GOOS=linux GOARCH=arm64 go build -o bin/reactor_linux_arm64 cmd/reactor/main.go
|
|
|
|
|
|
|
|
echo "Building tui binaries"
|
|
|
|
env GOOS=linux GOARCH=arm GOARM=7 go build -o bin/tui_linux_arm cmd/tui/main.go
|
|
|
|
env GOOS=linux GOARCH=arm64 go build -o bin/tui_linux_arm64 cmd/tui/main.go
|
|
|
|
env GOOS=linux GOARCH=amd64 go build -o bin/tui_linux_amd64 cmd/tui/main.go
|
|
|
|
|
|
|
|
echo "Building server binary"
|
|
|
|
env GOOS=linux GOARCH=amd64 go build -o bin/server_linux_amd64 cmd/server/main.go
|
|
|
|
|
|
|
|
echo "Compressing binaries for distrubution"
|
|
|
|
tar -czf pireactor.tar.gz -C bin reactor_linux_arm64
|
|
|
|
tar -czf bbreactor.tar.gz -C bin reactor_linux_arm
|
|
|
|
tar -czf server.tar.gz -C bin server_linux_amd64
|
|
|
|
tar -czf tui.tar.gz -C bin tui_linux_amd64 tui_linux_arm tui_linux_arm64
|