diff --git a/omnibus/config/software/datadog-trace-agent.rb b/omnibus/config/software/datadog-trace-agent.rb index c0af622165895..8bba3b2f1b548 100644 --- a/omnibus/config/software/datadog-trace-agent.rb +++ b/omnibus/config/software/datadog-trace-agent.rb @@ -32,27 +32,36 @@ gopath = Pathname.new(project_dir) + '../../../..' if windows? env = { - 'GOPATH' => gopath.to_path, - 'PATH' => "#{gopath.to_path}/bin:#{ENV['PATH']}", - 'WINDRES' => 'true', + # Trace agent uses GNU make to build. Some of the input to gnu make + # needs the path with `\` as separators, some needs `/`. Provide both, + # and let the makefile sort it out (ugh) + + # also on windows don't modify the path. Modifying the path here mixes + # `/` with `\` in the PATH variable, which confuses the make (and sub-processes) + # below. When properly configured the path on the windows box is sufficient. + 'GOPATH' => "#{windows_safe_path(gopath.to_path)}", } else env = { - 'GOPATH' => gopath.to_path, - 'PATH' => "#{gopath.to_path}/bin:#{ENV['PATH']}", + 'GOPATH' => gopath.to_path, + 'PATH' => "#{gopath.to_path}/bin:#{ENV['PATH']}", } end - command "go get github.com/Masterminds/glide", :env => env - command "glide install", :env => env - block do # defer compilation step in a block to allow getting the project's build version, which is populated # only once the software that the project takes its version from (i.e. `datadog-agent`) has finished building env['TRACE_AGENT_VERSION'] = project.build_version.gsub(/[^0-9\.]/, '') # used by gorake.rb in the trace-agent, only keep digits and dots - command "rake build", :env => env + + # build trace-agent + if windows? + command "make windows", :env => env + end + command "make install", :env => env + + # copy binary if windows? - copy trace_agent_binary, "#{install_dir}/bin/agent" + copy "#{gopath.to_path}/bin/#{trace_agent_binary}", "#{install_dir}/bin/agent" else copy trace_agent_binary, "#{install_dir}/embedded/bin" end diff --git a/release.json b/release.json index 5915377b80f66..3000333270f9d 100644 --- a/release.json +++ b/release.json @@ -1,7 +1,7 @@ { "nightly": { "INTEGRATIONS_CORE_VERSION": "master", - "TRACE_AGENT_VERSION": "6.0.0-rc.2", + "TRACE_AGENT_VERSION": "master", "PROCESS_AGENT_VERSION": "master", "JMXFETCH_VERSION": "0.18.2", "JMXFETCH_HASH": "ffbfc54929cbfc8e66214e01c1a0dd2509b73cdca500a72632718726215d5917"