2020-07-14 18:56:20 +00:00
|
|
|
BUILD=`date +%FT%T%z`
|
|
|
|
|
|
|
|
LDFLAGS=-ldflags "-X main.buildDate=${BUILD}"
|
|
|
|
|
|
|
|
.PHONY: build deps static
|
|
|
|
|
2020-07-15 19:19:06 +00:00
|
|
|
test:
|
|
|
|
go test git.martyn.berlin/martyn/twitchsingstools/internal/webserver
|
|
|
|
|
2020-07-14 18:56:20 +00:00
|
|
|
build:
|
|
|
|
go build ${LDFLAGS}
|
|
|
|
|
2020-08-01 09:38:05 +00:00
|
|
|
build-frontend:
|
|
|
|
cd build/react-frontend && npm run build
|
|
|
|
rm -rf web/react-frontend ; mkdir -p web/react-frontend
|
|
|
|
cp -r build/react-frontend/build/* web/react-frontend/
|
|
|
|
|
2020-07-14 18:56:20 +00:00
|
|
|
deps:
|
|
|
|
go get
|
|
|
|
|
|
|
|
static:
|
|
|
|
CGO_ENABLED=0 GOOS=linux go build ${LDFLAGS} -a -installsuffix cgo -o twitchsingstools .
|