Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ function run_docker_linux_arm64v8 {
./compile-linux.sh -ldflags "$VERSION_FLAGS" -o "dist/grok_exporter-$VERSION.linux-arm64v8/grok_exporter"
}

function run_docker_linux_arm32v7 {
docker run \
-v $GOPATH/src/github.com/fstab/grok_exporter:/root/go/src/github.com/fstab/grok_exporter \
--net none \
--rm -ti geekdave/grok_exporter-compiler-arm32v7:latest \
./compile-linux.sh -ldflags "$VERSION_FLAGS" -o "dist/grok_exporter-$VERSION.linux-arm32v7/grok_exporter"
}

#--------------------------------------------------------------
# Release functions
#--------------------------------------------------------------
Expand All @@ -101,6 +109,12 @@ function release_linux_arm64v8 {
create_zip_file grok_exporter-$VERSION.linux-arm64v8
}

function release_linux_arm32v7 {
echo "Building dist/grok_exporter-$VERSION.linux-arm32v7.zip"
run_docker_linux_arm32v7
create_zip_file grok_exporter-$VERSION.linux-arm32v7
}

function release_windows_amd64 {
echo "Building dist/grok_exporter-$VERSION.windows-amd64.zip"
run_docker_windows_amd64
Expand Down Expand Up @@ -130,6 +144,11 @@ case $1 in
run_tests
release_linux_arm64v8
;;
linux-arm32v7)
rm -rf dist/*
#run_tests
release_linux_arm32v7
;;
darwin-amd64)
rm -rf dist/*
run_tests
Expand All @@ -154,6 +173,7 @@ case $1 in
echo ' - darwin-amd64' >&2
echo ' - windows-amd64' >&2
echo ' - linux-arm64v8' >&2
echo ' - linux-arm32v7' >&2
echo ' - all-amd64' >&2
exit -1
esac