Skip to content

Commit f1d65cb

Browse files
committed
Fix IPA CI: empty EXTRA_FLAGS under set -u and core check curl
Avoid unbound array expansion on macOS bash and make the EverywhereCore freshness job resilient so it cannot fail the IPA build.
1 parent fc7caa6 commit f1d65cb

2 files changed

Lines changed: 17 additions & 26 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ jobs:
123123
name: Check EverywhereCore / Xray freshness
124124
runs-on: ubuntu-latest
125125
timeout-minutes: 10
126+
continue-on-error: true
126127
steps:
127128
- name: Checkout
128129
uses: actions/checkout@v4
@@ -136,7 +137,8 @@ jobs:
136137
echo "Latest EverywhereCore: $LATEST"
137138
XRAY=$(curl -fsSL https://proxy.golang.org/github.com/xtls/xray-core/@latest)
138139
echo "Latest Xray (Go proxy): $XRAY"
139-
CORE_MOD=$(curl -fsSL "https://raw.githubusercontent.com/NodePassProject/EverywhereCore/v${LATEST}/go/go.mod" | awk '/xray-core/{print; exit}')
140+
curl -fsSL "https://raw.githubusercontent.com/NodePassProject/EverywhereCore/v${LATEST}/go/go.mod" -o /tmp/everywherecore.go.mod
141+
CORE_MOD=$(awk '/xray-core/{print; exit}' /tmp/everywherecore.go.mod)
140142
echo "Xray in latest EverywhereCore: $CORE_MOD"
141143
if [[ "$LATEST" > "$PIN" ]]; then
142144
echo "::warning::EverywhereCore floor $PIN is behind latest $LATEST — bump Scripts/wire_project.rb"

‎Scripts/ci_export_ipa.sh‎

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# IPA_DIR path (default ./build/ipa)
1313
# EXPORT_OPTIONS plist path (default Config/ExportOptions-ad-hoc.plist)
1414
# DEVELOPMENT_TEAM optional Apple Team ID override
15-
# PRODUCT_BUNDLE_IDENTIFIER optional override for app id
1615
set -euo pipefail
1716

1817
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -27,40 +26,30 @@ EXPORT_OPTIONS="${EXPORT_OPTIONS:-$ROOT/Config/ExportOptions-ad-hoc.plist}"
2726

2827
mkdir -p "$(dirname "$ARCHIVE_PATH")" "$IPA_DIR" "$DERIVED_DATA"
2928

30-
EXTRA_FLAGS=()
31-
if [[ -n "${DEVELOPMENT_TEAM:-}" ]]; then
32-
EXTRA_FLAGS+=(DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM")
33-
fi
34-
# Do not pass a global PRODUCT_BUNDLE_IDENTIFIER — it would clobber the NE target.
35-
# Change bundle IDs in the Xcode project (or a CI pbxproj patch) when rebranding.
36-
3729
echo "→ wire SwiftPM deps"
3830
./build.sh
3931

32+
COMMON=(
33+
-project DecoderSec.xcodeproj
34+
-scheme DecoderSec
35+
-configuration "$CONFIGURATION"
36+
-destination 'generic/platform=iOS'
37+
-archivePath "$ARCHIVE_PATH"
38+
-derivedDataPath "$DERIVED_DATA"
39+
)
40+
if [[ -n "${DEVELOPMENT_TEAM:-}" ]]; then
41+
COMMON+=(DEVELOPMENT_TEAM="$DEVELOPMENT_TEAM")
42+
fi
43+
4044
echo "→ archive ($CONFIGURATION, signing=$SIGNING)"
4145
if [[ "$SIGNING" == "unsigned" ]]; then
42-
xcodebuild \
43-
-project DecoderSec.xcodeproj \
44-
-scheme DecoderSec \
45-
-configuration "$CONFIGURATION" \
46-
-destination 'generic/platform=iOS' \
47-
-archivePath "$ARCHIVE_PATH" \
48-
-derivedDataPath "$DERIVED_DATA" \
46+
xcodebuild "${COMMON[@]}" \
4947
CODE_SIGNING_ALLOWED=NO \
5048
CODE_SIGNING_REQUIRED=NO \
5149
CODE_SIGN_IDENTITY="" \
52-
"${EXTRA_FLAGS[@]}" \
5350
archive
5451
else
55-
xcodebuild \
56-
-project DecoderSec.xcodeproj \
57-
-scheme DecoderSec \
58-
-configuration "$CONFIGURATION" \
59-
-destination 'generic/platform=iOS' \
60-
-archivePath "$ARCHIVE_PATH" \
61-
-derivedDataPath "$DERIVED_DATA" \
62-
"${EXTRA_FLAGS[@]}" \
63-
archive
52+
xcodebuild "${COMMON[@]}" archive
6453

6554
echo "→ export IPA via $EXPORT_OPTIONS"
6655
xcodebuild \

0 commit comments

Comments
 (0)