mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-28 02:19:57 +08:00
adding some build scripts
This commit is contained in:
parent
ef0bbf53af
commit
37c9864ecd
3 changed files with 29 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
|||
/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
|
Loading…
Reference in a new issue