forked from lucaslorentz/caddy-docker-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·39 lines (30 loc) · 1.09 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -e
echo ==PARAMETERS==
echo ARTIFACTS: "${ARTIFACTS:=./artifacts}"
go vet ./...
go test -race ./...
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
# AMD64
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \
xcaddy build \
--output ${ARTIFACTS}/binaries/linux/amd64/caddy \
--with github.com/lucaslorentz/caddy-docker-proxy/v2=$PWD
# ARM
CGO_ENABLED=0 GOARCH=arm GOARM=6 GOOS=linux \
xcaddy build \
--output ${ARTIFACTS}/binaries/linux/arm/v6/caddy \
--with github.com/lucaslorentz/caddy-docker-proxy/v2=$PWD
CGO_ENABLED=0 GOARCH=arm GOARM=7 GOOS=linux \
xcaddy build \
--output ${ARTIFACTS}/binaries/linux/arm/v7/caddy \
--with github.com/lucaslorentz/caddy-docker-proxy/v2=$PWD
CGO_ENABLED=0 GOARCH=arm64 GOOS=linux \
xcaddy build \
--output ${ARTIFACTS}/binaries/linux/arm64/caddy \
--with github.com/lucaslorentz/caddy-docker-proxy/v2=$PWD
# AMD64 WINDOWS
CGO_ENABLED=0 GOARCH=amd64 GOOS=windows \
xcaddy build \
--output ${ARTIFACTS}/binaries/windows/amd64/caddy.exe \
--with github.com/lucaslorentz/caddy-docker-proxy/v2=$PWD