#!/usr/bin/env bash cd src VERSION=2.4 echo Building and packaging for Linux GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o ../httpcat-linux pushd .. cp httpcat-linux httpcat tar -czf httpcat-linux-${VERSION}.tgz httpcat rm httpcat popd echo echo Building and packaging for Windows GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o ../httpcat-win.exe pushd .. cp httpcat-win.exe httpcat.exe zip -9 httpcat-windows-${VERSION}.zip httpcat.exe rm httpcat.exe popd echo echo Building and packaging for Intel Macs GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o ../httpcat-mac-intel pushd .. cp httpcat-mac-intel httpcat tar -czf httpcat-mac-intel-${VERSION}.tgz httpcat rm httpcat popd echo echo Building and packaging for ARM64 Macs GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o ../httpcat-mac-arm64 pushd .. cp httpcat-mac-arm64 httpcat tar -czf httpcat-mac-arm64-${VERSION}.tgz httpcat rm httpcat popd