Files
converge/scripts/build
T
jbrechtel 60c2a9a5f8
Build / build (push) Failing after 20s
Adds gitea build and upx compression
2026-05-11 21:37:55 -04:00

23 lines
652 B
Python
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
echo "Formatting with fourmolu..."
./hs fourmolu --mode inplace app/ src/ test/
echo "Building..."
./hs stack build --copy-bins --local-bin-path /work/build
echo "Compressing with UPX..."
./hs bash -c '
UPX_VERSION="5.1.1"
UPX_URL="https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-amd64_linux.tar.xz"
UPX_DIR="/tmp/upx-${UPX_VERSION}-amd64_linux"
if [ ! -x "${UPX_DIR}/upx" ]; then
curl -fsSL "${UPX_URL}" | tar -xJ -C /tmp
fi
"${UPX_DIR}/upx" /work/build/converge
'
echo "Done: $(ls -lh build/converge | awk '{print $5}')"