You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
964 B
YAML

version: '3'
tasks:
clean:
desc: "clean all of the old binaries"
cmds:
- rm -v bin/* 2>/dev/null
all:
desc: "cleans and builds all"
deps: [clean, bb, server]
bb:
desc: "Builds and sends to the beaglebone"
cmds:
- task: go-build
vars:
GOARM: 7
GOARCH: "arm"
GOOS: "linux"
BUILD_DIR: "reactor"
- scp bin/reactor_linux_arm debian:~/
server:
desc: "Builds server binary"
cmds:
- task: go-build
vars:
BUILD_DIR: "server"
GOOS: "{{OS}}"
GOARCH: "{{ARCH}}"
go-build:
internal: true
cmds:
- go build -o bin/{{.BUILD_DIR}}_{{.GOOS}}_{{.GOARCH}} cmd/{{.BUILD_DIR}}/main.go
sources:
- internal/pkg/**/*.go
- cmd/{{.BUILD_DIR}}/main.go
generates:
- bin/{{.BUILD_DIR}}_{{.GOOS}}_{{.GOARCH}}
env:
GOARM: "{{.GOARM}}"
GOARCH: "{{.GOARCH}}"
GOOS: "{{.GOOS}}"