From f99799e07ade79bee2e8053ccc65305d64965f63 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 14:52:41 +0100 Subject: [PATCH 01/18] test nocache --- scripts/swiftlint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 9c7b2ec5a8..35ffd49916 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -23,7 +23,7 @@ fi if [ "$mode" = "fix" ]; then $CMD --fix elif [ "$mode" = "lint" ]; then - $CMD --strict + $CMD --strict --no-cache else echo "Invalid mode. Use 'fix' or 'lint'." exit 1 From be9e9c8a64df9f791e9ba49cf0de45132b4209e8 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 17:29:55 +0100 Subject: [PATCH 02/18] swift / arch validated --- .gitignore | 3 +++ scripts/swiftlint.sh | 52 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 51 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1870007b3f..0467cca1e1 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,6 @@ node_modules.bak # Sentry React Native Monorepo /packages/core/README.md .env.sentry-build-plugin + +# SwiftLint +swiftlint/* diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 35ffd49916..184c85df2a 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -11,15 +11,59 @@ fi # Set the mode based on the first argument mode=$1 -DARWIN_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/darwin-arm64/swiftlint" -LINUX_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/linux-x64/swiftlint" +SWIFT_PATH=$(which swift 2>/dev/null || true) + +if [ -z "$SWIFT_PATH" ]; then + echo "SwiftLint requires swift, which is not installed or not found in PATH" + echo "To install Swift:" + echo " * macOS: brew install swift" + echo " * ubuntu: follow steps here: https://www.swift.org/install/" + echo " * arch: yay -S swift-bin" + exit 1 +fi + + + +LINUX_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/swiftlint_linux_amd64.zip" +LINUX_SHA="sha256:02f4f580bbb27fb618dbfa24ce2f14c926461c85c26941289f58340151b63ae4" +DARWIN_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/portable_swiftlint.zip" +DARWIN_SHA="sha256:2342f3784307a02117e18f745fcd350c6acc6cab0e521c0c0e01c32a53a3b274" if [[ "$OSTYPE" == "darwin"* ]]; then - CMD="$DARWIN_PATH" + EXPECTED_SHA="$DARWIN_SHA" + EXPECTED_BIN="$DARWIN_BIN" +else + EXPECTED_SHA="$LINUX_SHA" + EXPECTED_BIN="$LINUX_BIN" +fi + +# Make ../swiftlint folder if it doesn't exist +SWIFTLINT_DIR="$(dirname "$0")/../swiftlint" +mkdir -p "$SWIFTLINT_DIR" + +# Skip download if sha256sum swiftlint.sha matches EXPECTED_SHA +SHA_FILE="$SWIFTLINT_DIR/swiftlint.sha" +if [ -f "$SHA_FILE" ] && [ "$(cat "$SHA_FILE")" = "$EXPECTED_SHA" ]; then + echo "SwiftLint already downloaded and verified." else - CMD="$LINUX_PATH" + echo "Clearing swiftlint folder..." + rm -rf "$SWIFTLINT_DIR"/* + + echo "Downloading SwiftLint..." + curl -L "$EXPECTED_BIN" -o "$SWIFTLINT_DIR/swiftlint.zip" + unzip "$SWIFTLINT_DIR/swiftlint.zip" -d "$SWIFTLINT_DIR" + # Save sha256sum of swiftlint.zip to ../swiftlint/swiftlint.sha + echo "$EXPECTED_SHA" > "$SHA_FILE" + # Remove swiftlint.zip + rm "$SWIFTLINT_DIR/swiftlint.zip" fi + +DARWIN_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/darwin-arm64/swiftlint" +LINUX_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/linux-x64/swiftlint" + +CMD="$(dirname "$0")/../swiftlint/swiftlint" + if [ "$mode" = "fix" ]; then $CMD --fix elif [ "$mode" = "lint" ]; then From 0c3c3ddbd8d477456f6b2d78218f7327fe0ba4a4 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 17:33:37 +0100 Subject: [PATCH 03/18] gh setup --- .github/workflows/buildandtest.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 81065f9623..ed820e307c 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -67,6 +67,11 @@ jobs: clang --version clang-format --version + - name: Setup Swift + uses: swift-actions/setup-swift@682457186b71c25a884c45c06f859febbe259240 # 2.3.0 + with: + version: '6.2.0' + - name: Lint run: yarn lint From d536ed186af8c624b2f8b658eefb90a53e168ee2 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 17:40:15 +0100 Subject: [PATCH 04/18] 6.2.0 not supported --- .github/workflows/buildandtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index ed820e307c..73476bfab2 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -70,7 +70,7 @@ jobs: - name: Setup Swift uses: swift-actions/setup-swift@682457186b71c25a884c45c06f859febbe259240 # 2.3.0 with: - version: '6.2.0' + version: '6.1.0' - name: Lint run: yarn lint From 6c2d7bda1ce7a6c1ecfbf84f69a631bb81f75e50 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 17:44:07 +0100 Subject: [PATCH 05/18] skip verify --- .github/workflows/buildandtest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 73476bfab2..086d7b19de 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -69,8 +69,10 @@ jobs: - name: Setup Swift uses: swift-actions/setup-swift@682457186b71c25a884c45c06f859febbe259240 # 2.3.0 + env: + SWIFT_VERIFY: false #probably fixes https://github.com/swift-actions/setup-swift/pull/772 with: - version: '6.1.0' + swift-version: '6.1.0' - name: Lint run: yarn lint From 939787130ccd25453288d51128e43545f16c3bd9 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 17:51:08 +0100 Subject: [PATCH 06/18] use swiftly --- .github/workflows/buildandtest.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 086d7b19de..e9c9119584 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -67,12 +67,16 @@ jobs: clang --version clang-format --version - - name: Setup Swift - uses: swift-actions/setup-swift@682457186b71c25a884c45c06f859febbe259240 # 2.3.0 - env: - SWIFT_VERIFY: false #probably fixes https://github.com/swift-actions/setup-swift/pull/772 - with: - swift-version: '6.1.0' + - name: Install Swift via Swiftly + run: | + SWIFTLY_HOME_DIR="$GITHUB_WORKSPACE/.swiftlint/swiftly" + mkdir -p "$SWIFTLY_HOME_DIR" + curl -sL https://github.com/compnerd/swift-build/releases/latest/download/swiftly-linux.tar.gz | tar xz -C "$SWIFTLY_HOME_DIR" + + export SWIFTLY_HOME_DIR="$SWIFTLY_HOME_DIR" + export SWIFTLY_PLATFORM=ubuntu20.04 # pick 20.04 or 22.04 + . "$SWIFTLY_HOME_DIR/env.sh" + hash -r - name: Lint run: yarn lint From b3cb7ba32f115b39b164bc8f6443eb7e78c661ec Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:00:59 +0100 Subject: [PATCH 07/18] split swiftly and swift --- .github/workflows/buildandtest.yml | 17 +++++++++-------- scripts/swiftlint.sh | 2 -- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index e9c9119584..0b29869310 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -67,17 +67,18 @@ jobs: clang --version clang-format --version - - name: Install Swift via Swiftly + - name: Install Swiftly run: | - SWIFTLY_HOME_DIR="$GITHUB_WORKSPACE/.swiftlint/swiftly" - mkdir -p "$SWIFTLY_HOME_DIR" - curl -sL https://github.com/compnerd/swift-build/releases/latest/download/swiftly-linux.tar.gz | tar xz -C "$SWIFTLY_HOME_DIR" - - export SWIFTLY_HOME_DIR="$SWIFTLY_HOME_DIR" - export SWIFTLY_PLATFORM=ubuntu20.04 # pick 20.04 or 22.04 - . "$SWIFTLY_HOME_DIR/env.sh" + tar zxf swiftly-$(uname -m).tar.gz && \ + ./swiftly init --quiet-shell-followup && \ + . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" && \ hash -r + - name: Install Swift 6.2.0 + run: | + swiftly install swift 6.2.0 + swift --version + - name: Lint run: yarn lint diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 184c85df2a..7040b53cef 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -22,8 +22,6 @@ if [ -z "$SWIFT_PATH" ]; then exit 1 fi - - LINUX_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/swiftlint_linux_amd64.zip" LINUX_SHA="sha256:02f4f580bbb27fb618dbfa24ce2f14c926461c85c26941289f58340151b63ae4" DARWIN_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/portable_swiftlint.zip" From efe310e826ede76e3f375cd0972d61cb81c25670 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:06:01 +0100 Subject: [PATCH 08/18] missing bits --- .github/workflows/buildandtest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 0b29869310..4d1dedab69 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -69,6 +69,7 @@ jobs: - name: Install Swiftly run: | + curl -sL https://github.com/compnerd/swift-build/releases/latest/download/swiftly-$(uname -m).tar.gz && \ tar zxf swiftly-$(uname -m).tar.gz && \ ./swiftly init --quiet-shell-followup && \ . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" && \ From 137471d88aaff41a91827a7e819f68ff9b0b3725 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:12:07 +0100 Subject: [PATCH 09/18] wip --- .github/workflows/buildandtest.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 4d1dedab69..4c54954fff 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -69,10 +69,12 @@ jobs: - name: Install Swiftly run: | - curl -sL https://github.com/compnerd/swift-build/releases/latest/download/swiftly-$(uname -m).tar.gz && \ - tar zxf swiftly-$(uname -m).tar.gz && \ - ./swiftly init --quiet-shell-followup && \ - . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" && \ + SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" + curl -sL https://github.com/compnerd/swift-build/releases/latest/download/$SWIFTLY_FILE -o $SWIFTLY_FILE + tar zxf $SWIFTLY_FILE + + ./swiftly init --quiet-shell-followup + . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" hash -r - name: Install Swift 6.2.0 From 25b4425b197f9d4395af63c0a9509e0adbdc1636 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:21:36 +0100 Subject: [PATCH 10/18] move priority / WIP --- .github/workflows/buildandtest.yml | 32 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 4c54954fff..ba372c2ade 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -49,6 +49,23 @@ jobs: node-version: 18 cache: 'yarn' cache-dependency-path: yarn.lock + + - name: Install Swiftly + run: | + SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" + curl -sL https://download.swift.org/swiftly/linux/swiftly-x86_64.tar.gz -o $SWIFTLY_FILE + tar zxf $SWIFTLY_FILE + + ./swiftly init --quiet-shell-followup + . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" + hash -r + + - name: Install Swift 6.2.0 + run: | + swiftly install swift 6.2.0 + swift --version + + - name: Install Dependencies run: yarn install @@ -67,21 +84,6 @@ jobs: clang --version clang-format --version - - name: Install Swiftly - run: | - SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" - curl -sL https://github.com/compnerd/swift-build/releases/latest/download/$SWIFTLY_FILE -o $SWIFTLY_FILE - tar zxf $SWIFTLY_FILE - - ./swiftly init --quiet-shell-followup - . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" - hash -r - - - name: Install Swift 6.2.0 - run: | - swiftly install swift 6.2.0 - swift --version - - name: Lint run: yarn lint From 728b963308372e9f1721af8e12b5e84207f86c67 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:24:07 +0100 Subject: [PATCH 11/18] mor steps --- .github/workflows/buildandtest.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index ba372c2ade..8a6d25a22d 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -59,13 +59,12 @@ jobs: ./swiftly init --quiet-shell-followup . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" hash -r + sudo apt-get -y install libcurl4-openssl-dev - - name: Install Swift 6.2.0 + - name: Check Swift 6.2.0 run: | - swiftly install swift 6.2.0 swift --version - - name: Install Dependencies run: yarn install From d4184a2e7459b5a7c6def1fc69e79f6953575897 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:31:42 +0100 Subject: [PATCH 12/18] package sync --- .github/workflows/buildandtest.yml | 26 +++++++++++--------------- package.json | 1 - yarn.lock | 10 ---------- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 8a6d25a22d..8c46a5bbc7 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -50,21 +50,6 @@ jobs: cache: 'yarn' cache-dependency-path: yarn.lock - - name: Install Swiftly - run: | - SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" - curl -sL https://download.swift.org/swiftly/linux/swiftly-x86_64.tar.gz -o $SWIFTLY_FILE - tar zxf $SWIFTLY_FILE - - ./swiftly init --quiet-shell-followup - . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" - hash -r - sudo apt-get -y install libcurl4-openssl-dev - - - name: Check Swift 6.2.0 - run: | - swift --version - - name: Install Dependencies run: yarn install @@ -83,6 +68,17 @@ jobs: clang --version clang-format --version + - name: Install Swiftly + run: | + SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" + curl -sL https://download.swift.org/swiftly/linux/swiftly-x86_64.tar.gz -o $SWIFTLY_FILE + tar zxf $SWIFTLY_FILE + + ./swiftly init --quiet-shell-followup + . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" + hash -r + sudo apt-get -y install libcurl4-openssl-dev + - name: Lint run: yarn lint diff --git a/package.json b/package.json index 1c1afc9b16..cac7281f7b 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "set-version-samples": "lerna run set-version" }, "devDependencies": { - "@expo/swiftlint": "^0.57.1", "@naturalcycles/ktlint": "^1.13.0", "@sentry/cli": "2.55.0", "downlevel-dts": "^0.11.0", diff --git a/yarn.lock b/yarn.lock index b85ab193ef..0c1343f8cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5916,15 +5916,6 @@ __metadata: languageName: node linkType: hard -"@expo/swiftlint@npm:^0.57.1": - version: 0.57.1 - resolution: "@expo/swiftlint@npm:0.57.1" - dependencies: - "@expo/spawn-async": ^1.5.0 - checksum: 87f744bb45cc3a4aa2a40424d21995547c138eef4d4918a3990859c9f143acd3ce463ff3f0c421c0b3e95a694abf7d8fcb8c8545dbe00d81767fc461a68c8378 - languageName: node - linkType: hard - "@expo/vector-icons@npm:^14.0.0": version: 14.0.2 resolution: "@expo/vector-icons@npm:14.0.2" @@ -28327,7 +28318,6 @@ __metadata: version: 0.0.0-use.local resolution: "sentry-react-native@workspace:." dependencies: - "@expo/swiftlint": ^0.57.1 "@naturalcycles/ktlint": ^1.13.0 "@sentry/cli": 2.55.0 downlevel-dts: ^0.11.0 From 7441e6bf98f8d5286ef3298dabc0743295a72e5c Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:32:03 +0100 Subject: [PATCH 13/18] rollback swift check: --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d665497f2..cac7281f7b 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "clean": "lerna run clean", "circularDepCheck": "lerna run circularDepCheck", "test": "lerna run test", - "fix": "run-s fix:lerna fix:android fix:kotlin fix:clang", + "fix": "run-s fix:lerna fix:android fix:kotlin fix:clang fix:swift", "fix:lerna": "lerna run fix", "fix:android": "run-s 'java:format fix' java:pmd", "fix:clang": "run-s 'clang:format fix'", "fix:swift": "run-s 'swift:lint fix'", "fix:kotlin": "npx ktlint --relative --format '!**/node_modules/**'", - "lint": "run-s lint:lerna lint:android lint:kotlin lint:clang", + "lint": "run-s lint:lerna lint:android lint:kotlin lint:clang lint:swift ", "lint:lerna": "lerna run lint", "lint:android": "run-s 'java:format lint' java:pmd", "lint:clang": "run-s 'clang:format lint'", From f5f49a750459e93cedb98fa5a78e0ed7afa3c7b2 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:42:28 +0100 Subject: [PATCH 14/18] remove mention of macos since it already bundles swift with xcode --- scripts/swiftlint.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 7040b53cef..2817c98604 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -16,7 +16,6 @@ SWIFT_PATH=$(which swift 2>/dev/null || true) if [ -z "$SWIFT_PATH" ]; then echo "SwiftLint requires swift, which is not installed or not found in PATH" echo "To install Swift:" - echo " * macOS: brew install swift" echo " * ubuntu: follow steps here: https://www.swift.org/install/" echo " * arch: yay -S swift-bin" exit 1 From f0bfbc164705a9688bc9bc9628d14c737978aca9 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Fri, 26 Sep 2025 18:44:35 +0100 Subject: [PATCH 15/18] Apply suggestion from @lucas-zimerman --- .github/workflows/buildandtest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 8c46a5bbc7..c6c335fce0 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -49,7 +49,6 @@ jobs: node-version: 18 cache: 'yarn' cache-dependency-path: yarn.lock - - name: Install Dependencies run: yarn install From 4b0f95553ba77631d831f9e1e889c8be8ffbd55c Mon Sep 17 00:00:00 2001 From: LucasZF Date: Fri, 26 Sep 2025 18:46:15 +0100 Subject: [PATCH 16/18] Apply suggestion from @lucas-zimerman --- scripts/swiftlint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 2817c98604..a1eecfac9a 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -64,7 +64,7 @@ CMD="$(dirname "$0")/../swiftlint/swiftlint" if [ "$mode" = "fix" ]; then $CMD --fix elif [ "$mode" = "lint" ]; then - $CMD --strict --no-cache + $CMD --strict else echo "Invalid mode. Use 'fix' or 'lint'." exit 1 From b3c7a46915c0e3a4d670942e25a627e4b7cbf247 Mon Sep 17 00:00:00 2001 From: lucas Date: Fri, 26 Sep 2025 18:54:57 +0100 Subject: [PATCH 17/18] nit --- scripts/swiftlint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 7040b53cef..f6227eeb39 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -56,6 +56,10 @@ else rm "$SWIFTLINT_DIR/swiftlint.zip" fi +if [ ! -f "$SHA_FILE" ] || [ "$(cat "$SHA_FILE")" != "$EXPECTED_SHA" ]; then + echo "Invalid SwiftLint, sha doesn't match the expected download." + exit 1 +fi DARWIN_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/darwin-arm64/swiftlint" LINUX_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/linux-x64/swiftlint" From 64fe247d3b855dea1cefff1ff1e4ccd6e3cc239e Mon Sep 17 00:00:00 2001 From: LucasZF Date: Mon, 29 Sep 2025 18:23:20 +0100 Subject: [PATCH 18/18] Apply suggestion from @antonis Co-authored-by: Antonis Lilis --- scripts/swiftlint.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index 6f198ba3ed..bd0cb23f3f 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -60,9 +60,6 @@ if [ ! -f "$SHA_FILE" ] || [ "$(cat "$SHA_FILE")" != "$EXPECTED_SHA" ]; then exit 1 fi -DARWIN_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/darwin-arm64/swiftlint" -LINUX_PATH="$(dirname "$0")/../node_modules/@expo/swiftlint/bin/linux-x64/swiftlint" - CMD="$(dirname "$0")/../swiftlint/swiftlint" if [ "$mode" = "fix" ]; then