Skip to content

Instantly share code, notes, and snippets.

@Dimtree
Created April 3, 2019 20:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dimtree/d172e5ff40804087dc5c23e5c2b686f0 to your computer and use it in GitHub Desktop.
Save Dimtree/d172e5ff40804087dc5c23e5c2b686f0 to your computer and use it in GitHub Desktop.
Build a Caddy webserver release with no telemetry enabled.
#!/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