add linux static target

This commit is contained in:
Michael Vaughan
2022-02-11 12:38:29 -05:00
committed by Pin
parent bb97442081
commit e8379e0c66
4 changed files with 24 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ WIN=windows-agent.exe
FLAGS=-ldflags "-s -w"
WIN-FLAGS=-ldflags -H=windowsgui
all: clean create-directory agent-windows agent-linux
all: clean create-directory agent-windows agent-linux agent-linux-static
create-directory:
mkdir ${DIRECTORY}
@@ -17,5 +17,9 @@ agent-linux:
echo "Compiling Linux binary"
env GOOS=linux GOARCH=amd64 go build ${FLAGS} -o ${DIRECTORY}/${LINUX} main.go
agent-linux-static:
echo "Compiling static Linux binary"
docker run --rm=true -itv $(PWD):/mnt alpine:3.7 /mnt/build_static.sh
clean:
rm -rf ${DIRECTORY}