name "datadog-gohai"
default_version "last-stable"
always_build true

go_path "/var/cache/omnibus/src/datadog-gohai"

env = {
  "GOROOT" => "/usr/local/go",
  "GOPATH" => go_path
}

build do
   command "$GOROOT/bin/go get -d -u github.com/DataDog/gohai", :env => env
   command "git checkout #{default_version} && git pull", :env => env, :cwd => "#{go_path}/src/github.com/DataDog/gohai"
   command "$GOROOT/bin/go build -o #{install_dir}/bin/gohai $GOPATH/src/github.com/DataDog/gohai/gohai.go", :env => env
end

name "datadog-gohai"
default_version "last-stable"
always_build true

env = {
  "GOROOT" => "/usr/local/go",
  "GOPATH" => "/var/cache/omnibus/src/datadog-gohai"
}

build do
   command "$GOROOT/bin/go get -d -u github.com/DataDog/gohai", :env => env
   command "git checkout #{default_version} && git pull", :env => env, :cwd => "/var/cache/omnibus/src/datadog-gohai/src/github.com/DataDog/gohai"
   command "$GOROOT/bin/go build -o #{install_dir}/bin/gohai $GOPATH/src/github.com/DataDog/gohai/gohai.go", :env => env
end

Revert "use go_path as a variable"
Revert "use go_path as a variable"

This reverts commit 91bf251df91c3c70c7196c39a8b8e5b3d06e2ee3.
