From a653f50fbd8ac8a06908ca30235fc92d0d2dccec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Tue, 25 Jun 2024 00:41:41 +0200 Subject: [PATCH] process binaries --- .github/workflows/ci.yml | 6 ++---- .github/workflows/process-binaries.sh | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 .github/workflows/process-binaries.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 009939c..a3453f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,7 @@ jobs: - name: Package the confer-head executable run: | CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer) - strip $CONFER_EXEC - upx -9 $CONFER_EXEC + .github/workflows/process-binaries.sh DIR=$(dirname $CONFER_EXEC) FILE=$(basename $CONFER_EXEC) CONFER_EXEC_TAR=confer-head-${{ runner.os }}-$(uname -m).tar.gz @@ -116,8 +115,7 @@ jobs: - name: Tar cabal head executable run: | CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer) - strip $CONFER_EXEC - upx -9 $CONFER_EXEC + .github/workflows/process-binaries.sh DIR=$(dirname $CONFER_EXEC) FILE=$(basename $CONFER_EXEC) CONFER_EXEC_TAR=confer-head-${{ runner.os }}-static-$(uname -m).tar.gz diff --git a/.github/workflows/process-binaries.sh b/.github/workflows/process-binaries.sh old mode 100644 new mode 100755 index 4fac51d..f3f4211 --- a/.github/workflows/process-binaries.sh +++ b/.github/workflows/process-binaries.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +CONFER_EXEC=$(cabal list-bin --project-file=cabal.release.project confer:exe:confer) + case "$(uname -s)" in - Linux*) strip $CONFER_EXEC && upx -9 $CONFER_EXEC + Linux*) strip $CONFER_EXEC && upx -9 $CONFER_EXEC;; Darwin*) strip $CONFER_EXEC;; +esac