Skip to content

Commit c6354aa

Browse files
authored
macOS Bundle and Action fix (#577)
1 parent 06bed87 commit c6354aa

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

‎.github/workflows/build-macos.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ jobs:
6363
- name: Scripts Calc Formula - ${{ env.TARGET }} Bundle ${{ matrix.bundle }}
6464
run: ./scripts/calculate_formulas.sh
6565
- name: Scripts Install
66-
run: ./scripts/osx/install.sh
66+
run: |
67+
./scripts/osx/install.sh
68+
echo "$(brew --prefix)/bin" >> "$GITHUB_PATH"
69+
- name: Verify Homebrew Bash
70+
run: |
71+
command -v bash
72+
bash --version
6773
- name: 'Download artifacts'
6874
uses: actions/github-script@v9.0.0
6975
if: env.USE_ARTIFACT == 'true'

‎scripts/osx/build_xcframework.sh‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ ROOT=$(
1313
)/../../
1414
APOTHECARY_PATH=$ROOT/apothecary
1515

16-
BUNDLE_NO="$1"
17-
# Check if the argument is provided
18-
if [ -z "${BUNDLE_NO+x}" ]; then
19-
echo "No argument provided."
20-
export BUNDLE=1
21-
else
22-
echo "Argument 1: $BUNDLE_NO"
23-
export BUNDLE=$BUNDLE_NO
24-
fi
16+
BUNDLE_NO="${1:-${BUNDLE:-1}}"
17+
echo "Bundle: $BUNDLE_NO"
18+
export BUNDLE="$BUNDLE_NO"
2519

2620
export TARGET=osx
2721
export ARCH=arm64

‎scripts/osx/install.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env bash
2+
set -e
3+
24
# Silent update to prevent long logs
35

46
if ! which realpath >&/dev/null; then

‎scripts/osx/xcframework_all.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Apothecary ROOT dir relative
44

@@ -85,7 +85,7 @@ move_libraries() {
8585

8686
build_xcframework() {
8787
echo "build_xcframework"
88-
${SCRIPT_DIR}/build_xcframework.sh
88+
"${SCRIPT_DIR}/build_xcframework.sh" "$BUNDLE"
8989
if [ $? -ne 0 ]; then
9090
echo "Error building $PLATFORM$ARCHE"
9191
exit 1

0 commit comments

Comments
 (0)