Initial set of builds for Cadmium
This commit is contained in:
15
scripts/build
Executable file
15
scripts/build
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Usage: $0 <Tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building Cadmium $1..."
|
||||
|
||||
cm="github.com/mholt/caddy/caddy/caddymain"
|
||||
go build \
|
||||
-o cadmium \
|
||||
-ldflags "-X \"$cm.gitTag=$1\" -X \"$cm.gitNearestTag=$1\"" \
|
||||
github.com/mholt/caddy/caddy
|
||||
|
24
scripts/download
Executable file
24
scripts/download
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x$1" = "x" ]; then
|
||||
echo "Usage: $0 <Tarball URL>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "source" ]; then
|
||||
echo "source/ directory already exists, remove it first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -L "$1" | tar -xzf -
|
||||
mv caddy* source
|
||||
|
||||
# Disable telemetry in run.go and rename to Cadmium
|
||||
patch -d source -p1 <"$(pwd)/patches/run.go.diff"
|
||||
|
||||
# Replace telemetry with a stub
|
||||
rm -r source/telemetry
|
||||
mkdir source/telemetry
|
||||
cp patches/collection.go source/telemetry/collection.go
|
||||
|
||||
|
Reference in New Issue
Block a user