- Change Makefile to output statically linked binary
- Change Vagrantfile
This commit is contained in:
parent
5e46d5e45a
commit
9a16e22c80
4
Makefile
4
Makefile
|
@ -2,7 +2,9 @@ UNAME := $(shell sh -c 'uname')
|
|||
VERSION := $(shell sh -c 'git describe --always --tags')
|
||||
|
||||
build: prepare
|
||||
$(GOPATH)/bin/godep go build -o telegraf -ldflags \
|
||||
CGO_ENABLED=0 GOOS=linux ARCH=amd64 $(GOPATH)/bin/godep go build -a -installsuffix cgo \
|
||||
-o telegraf \
|
||||
-ldflags \
|
||||
"-X main.Version $(VERSION)" \
|
||||
./cmd/telegraf/telegraf.go
|
||||
|
||||
|
|
|
@ -9,8 +9,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||
config.vm.box = "ubuntu/trusty64"
|
||||
config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/koksan83/telegraf",
|
||||
type: "rsync",
|
||||
rsync__args: ["--verbose", "--archive", "--delete", "-z", "--safe-links"],
|
||||
rsync__exclude: ["./telegraf", ".vagrant/"]
|
||||
rsync__args: ["--verbose"],
|
||||
# rsync__args: ["--verbose", "--archive", "--delete", "-z", "--safe-links"],
|
||||
rsync__exclude: [".vagrant/"]
|
||||
# rsync__exclude: ["./telegraf", ".vagrant/"]
|
||||
|
||||
config.vm.provision "shell", name: "sudo", inline: <<-SHELL
|
||||
chown -R vagrant:vagrant /home/vagrant/go
|
||||
|
|
Loading…
Reference in New Issue