mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
adding some build scripts
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,4 @@
|
|||||||
/tmp
|
/tmp
|
||||||
|
dnscontrol-Darwin
|
||||||
|
dnscontrol-Linux
|
||||||
|
dnscontrol.exe
|
||||||
|
|||||||
23
build.sh
Executable file
23
build.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
PKG=github.com/StackExchange/dnscontrol
|
||||||
|
FLAGS="-s -w"
|
||||||
|
|
||||||
|
echo 'Building Linux'
|
||||||
|
go build -o dnscontrol-Linux -ldflags "$FLAGS" $PKG
|
||||||
|
|
||||||
|
echo 'Building Windows'
|
||||||
|
export GOOS=windows
|
||||||
|
go build -o dnscontrol.exe -ldflags "$FLAGS" $PKG
|
||||||
|
|
||||||
|
echo 'Building Darwin'
|
||||||
|
export GOOS=darwin
|
||||||
|
go build -o dnscontrol-Darwin -ldflags "$FLAGS" $PKG
|
||||||
|
|
||||||
|
ls -lah dnscontrol*
|
||||||
|
|
||||||
|
echo 'Compressing executables'
|
||||||
|
upx dnscontrol.exe
|
||||||
|
upx dnscontrol-Linux
|
||||||
|
upx dnscontrol-Darwin
|
||||||
|
|
||||||
|
ls -lah dnscontrol*
|
||||||
3
dockerbuild.sh
Executable file
3
dockerbuild.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
# Run build.sh in a docker container that is guaranteed to have all of the appropriate tools we need
|
||||||
|
PKG=github.com/StackExchange/dnscontrol
|
||||||
|
docker run -v `pwd`:/go/src/$PKG -w /go/src/github.com/StackExchange/dnscontrol captncraig/golang-build /bin/sh /go/src/github.com/StackExchange/dnscontrol/build.sh
|
||||||
Reference in New Issue
Block a user