Created
April 3, 2019 20:57
-
-
Save Dimtree/d172e5ff40804087dc5c23e5c2b686f0 to your computer and use it in GitHub Desktop.
Build a Caddy webserver release with no telemetry enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
mkdir -p out | |
export GOPATH="$(mktemp -d)" | |
go get -u -v github.com/mholt/caddy/caddy | |
go get -u -v github.com/caddyserver/builds | |
pushd "$GOPATH"/src/github.com/mholt/caddy/caddy | |
sed -i 's/var EnableTelemetry = true/var EnableTelemetry = false/' caddymain/run.go | |
go run build.go | |
popd | |
mv -iv "$GOPATH/bin/"* ./out | |
rm -rvf "$GOPATH" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment