Skip to content

Commit 5b6875a

Browse files
chore: delete unused lint wrappers + wire sync-checksums into release.yml
Audit of every script in the repo revealed three genuinely unused scripts and one unwired helper. Fixed both. Deleted: - scripts/lint-all.sh, scripts/lint-android.sh, scripts/lint-ios.sh No workflow, pre-commit hook, README, or Makefile references them. .pre-commit-config.yaml calls `swiftlint` directly rather than these wrappers, so they were dead weight. Wired up: - release.yml now calls scripts/sync-checksums.sh against the flattened release-flat/ dir before creating the GitHub Release. Updates Package.swift SHA-256 lines to match the zips we're about to attach. Attaches the updated Package.swift as an audit asset; auto-commit back to main is a follow-up. Kept after audit (all actively referenced): - scripts/detect-mode.sh — sourced by every package-sdk.sh (5 refs) - scripts/sync-versions.sh — release engineer pre-tag, release.yml validate - scripts/sync-checksums.sh — now wired (see above) - scripts/validate-artifact.sh — called by package-sdk.sh (Web/Kotlin/RN) - sdk/runanywhere-commons/scripts/* — all referenced by CMake/workflows/ devs; includes build-server.sh (wraps RAC_BUILD_SERVER CMake option) - sdk/runanywhere-commons/tests/scripts/* — dev test runners, documented - All per-SDK scripts/*.sh — referenced by README/workflows/other scripts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 90aeb3d commit 5b6875a

5 files changed

Lines changed: 24 additions & 335 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,30 @@ jobs:
514514
find release-artifacts -type f \( -name "*.zip" -o -name "*.tar.gz" -o -name "*.aar" -o -name "*.jar" -o -name "*.tgz" -o -name "*.sha256" \) -exec cp {} release-flat/ \;
515515
(cd release-flat && ls -la > MANIFEST.txt)
516516
cat release-flat/MANIFEST.txt
517+
- name: Sync Package.swift checksums from freshly-built XCFrameworks
518+
# Updates the SHA-256 checksum lines in Package.swift so SPM consumers
519+
# who pin to v${VERSION} can resolve the binary targets against the
520+
# zips we're about to attach to this Release. No-op if only native_ios
521+
# failed earlier.
522+
run: |
523+
if ls release-flat/RACommons-v*.zip >/dev/null 2>&1; then
524+
./scripts/sync-checksums.sh release-flat
525+
if ! git diff --quiet Package.swift; then
526+
echo "Package.swift checksums updated:"
527+
git diff Package.swift | head -40
528+
# Commit the checksum bump on a detached ref; don't push here —
529+
# the engineer pushed the tag already; we just fold the fresh
530+
# checksum commit onto main via a scheduled follow-up PR, or
531+
# they update it manually after the Release is cut.
532+
# For now, attach the updated Package.swift as a release asset
533+
# so it's auditable; deeper auto-commit flow is a follow-up.
534+
cp Package.swift release-flat/Package.swift.updated
535+
else
536+
echo "Package.swift checksums already match (no changes)"
537+
fi
538+
else
539+
echo "::warning::No RACommons-v*.zip in release-flat — skipping checksum sync"
540+
fi
517541
- name: Create / update GitHub Release
518542
uses: softprops/action-gh-release@v2
519543
with:

scripts/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Every shell script in the repo lives in one of these places, organized by scope:
1010
| `sync-versions.sh <version>` | Bumps the version string in every manifest across the monorepo (`VERSION`, `VERSIONS`, `Package.swift`, `gradle.properties`, all `package.json`, all `pubspec.yaml`). Run locally before tagging a release. |
1111
| `sync-checksums.sh <zip_dir>` | Reads SHA-256 of freshly-built XCFramework zips and updates the `checksum: "..."` lines in root `Package.swift`. Run in the release workflow after native iOS/macOS builds produce the zips. |
1212
| `validate-artifact.sh <file>...` | Type-aware sanity check for each artifact extension (XCFramework Info.plist + slices, `.so` ELF magic, `.aar` classes.jar + jni, `.wasm` magic bytes, `.tgz` package.json). Same script runs locally and in CI. |
13-
| `lint-all.sh`, `lint-android.sh`, `lint-ios.sh` | Cross-project lint runners (pre-existing — not part of the artifact system). |
1413

1514
## Per-SDK `sdk/runanywhere-<lang>/scripts/`
1615

scripts/lint-all.sh

Lines changed: 0 additions & 146 deletions
This file was deleted.

scripts/lint-android.sh

Lines changed: 0 additions & 99 deletions
This file was deleted.

scripts/lint-ios.sh

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)