mirror of
https://github.com/gmemstr/sliproad.git
synced 2024-09-19 16:11:11 +01:00
c28851fcc3
Making some improvements to the future maintainability of the project, namely in the form of tests. Also implemented a new "dist" command to the Makefile that packs up the binaries, and will eventually be expanded to do more legwork when prepping for a release. Updated file providers to use io.Reader over an explicit multipart file, and removed the handler in favour of a plain filename, since that was it's primary purpose.
26 lines
362 B
Makefile
26 lines
362 B
Makefile
.DEFAULT_GOAL := build
|
|
|
|
build:
|
|
go build
|
|
|
|
pi:
|
|
env GOOS=linux GOARCH=arm GOARM=5 go build -o nas-pi
|
|
|
|
small:
|
|
go build -ldflags="-s -w"
|
|
upx --brute nas
|
|
|
|
small_pi:
|
|
env GOOS=linux GOARCH=arm GOARM=5 go build -o nas-arm -ldflags="-s -w"
|
|
upx --brute nas-arm
|
|
|
|
run:
|
|
go run webserver.go
|
|
|
|
test:
|
|
go test ./... -cover
|
|
|
|
dist: small small_pi
|
|
mkdir build
|
|
mv nas* build
|