chore: Update alpha-build.sh script to handle xvfb-run not found and set LLVM_PROFDATA path conditionally

This commit is contained in:
Mauro Balades
2024-07-20 11:19:40 +02:00
parent dcd63d66bc
commit 3f7e2bf1c7
3 changed files with 7 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
set -x
set -ex
export ZEN_RELEASE=1
@@ -13,16 +13,12 @@ if ! command -v Xvfb &> /dev/null
then
ulimit -n 4096
Xvfb :2 -screen 0 1024x768x24 &
# Check if dir exists
if [ -d $HOME/win-cross ]
then
export LLVM_PROFDATA="$HOME/win-cross/clang/bin/llvm-profdata"
else
export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata
fi
export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata
export DISPLAY=:2
pnpm build
else
echo "Xvfb could not be found, running without it"
echo "ASSUMING YOU ARE RUNNING THIS ON MACOS"
set -v
pnpm build
fi