Skip to content

Commit

Permalink
Let fetch_collectors.sh fail early
Browse files Browse the repository at this point in the history
  • Loading branch information
bernd committed Oct 25, 2023
1 parent 4ca35f1 commit 5c8c207
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dist/fetch_collectors.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -eo pipefail

FILEBEAT_VERSION=8.9.0
FILEBEAT_VERSION_32=7.17.12
WINLOGBEAT_VERSION=8.9.0
Expand All @@ -24,7 +26,7 @@ download_beat()
archive="/tmp/${name}-${version}-${os}-${arch}.zip"
if [ ! -f $archive ]; then
echo "==> Downloading ${name}-${version}-${os}-${arch}"
curl -o $archive https://artifacts.elastic.co/downloads/beats/${name}/${name}-oss-${version}-${os}-${arch}.zip
curl -fsSL -o $archive https://artifacts.elastic.co/downloads/beats/${name}/${name}-oss-${version}-${os}-${arch}.zip
fi
unzip -o -d dist/collectors/${name}/${os}/${arch} $archive
mv dist/collectors/${name}/${os}/${arch}/${name}-${version}-${os}-${arch}/* dist/collectors/${name}/${os}/${arch}/
Expand All @@ -34,7 +36,7 @@ download_beat()
archive="/tmp/${name}-${version}-${os}-${arch}.tar.gz"
if [ ! -f $archive ]; then
echo "==> Downloading ${name}-${version}-${os}-${arch}"
curl -o $archive https://artifacts.elastic.co/downloads/beats/${name}/${name}-oss-${version}-${os}-${arch}.tar.gz
curl -fsSL -o $archive https://artifacts.elastic.co/downloads/beats/${name}/${name}-oss-${version}-${os}-${arch}.tar.gz
fi
tar -xzf $archive --strip-components=1 -C dist/collectors/${name}/${os}/${arch}
;;
Expand Down

0 comments on commit 5c8c207

Please sign in to comment.