elastic / logstash-devutils

An assortment of tooling/libraries to make Logstash core and plugin development and releasing a bit easier.
Apache License 2.0
18 stars 27 forks source link

Download of artifacts from URLs doesn't follow redirects. #104

Closed andsel closed 9 months ago

andsel commented 9 months ago

Create a rakefile that invokes the download method on an url that has redirect, test_download_file.rake in this project root, as:

import "lib/logstash/devutils/rake/vendor.rake"

task "test_download" do
  output = "vendor/collectd-5.4.2.tar.gz"
  url = "https://github.com/collectd/collectd/archive/refs/tags/collectd-5.4.2.tar.gz"
  actual_sha1 = download(url, output)
end

and execute the task as:

rake --rakefile test_download_file.rake test_download

Checking the content of vendor/collectd-5.4.2.tar.gz would result in empty file