From 41a94795ffa8a769adf37ac562587d2f8c6087e8 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sat, 17 Oct 2026 22:57:20 +0700 Subject: [PATCH] chore: remove repo trash --- .claude/rules/ci.md | 2 +- .../references/verification-apple.md | 4 +- .claude/skills/fix-issue/scripts/worktree.sh | 4 -- .gitattributes | 2 - .github/workflows/macos-tests.yml | 4 -- .gitignore | 13 ----- Plugins/CassandraDriverPlugin/Info.plist | 18 ------ Plugins/RedisDriverPlugin/Info.plist | 18 ------ README.md | 7 +-- TablePro/Info.plist | 11 ---- .../Resources/ThirdPartyLicenses/licenses.yml | 55 ++++++++----------- project.yml | 2 +- scripts/lib/common.sh | 21 +------ 13 files changed, 31 insertions(+), 130 deletions(-) diff --git a/.claude/rules/ci.md b/.claude/rules/ci.md index ae849a2d6d..46e4c9b7aa 100644 --- a/.claude/rules/ci.md +++ b/.claude/rules/ci.md @@ -33,7 +33,7 @@ The required check names are in `AGENTS.md` (CI). Reading a red check: `.claude/ - Triggers: pull request, push to main, dispatch. A PR keeps only its newest run; each main commit has its own concurrency group and is never cancelled. - `Changes (macOS)` outputs `run` (detector `macos`) and `plugins` (detector `plugins`). The test job has a 120-minute limit and sets `NSUnbufferedIO=YES`. -- Setup, in order: checkout, setup-xcode, setup-xcodegen, `scripts/download-libs.sh`, an empty `Configs/Secrets.xcconfig`, `generate-project.sh macos`, SPM restore, resolve, SPM save. +- Setup, in order: checkout, setup-xcode, setup-xcodegen, `scripts/download-libs.sh`, `generate-project.sh macos`, SPM restore, resolve, SPM save. - One `build-for-testing` with no `-testPlan` builds both plans and writes one `.xctestrun` per plan, with signing, the index store and the compilation cache off. - `COMPILE_PLUGINS` is true on every push and dispatch, and on a PR when the `plugins` detector is not false. It adds Go, the Dameng and HANA bridge builds, `xcodebuild build -scheme AllPlugins`, then `scripts/ci/verify-plugin-loads.sh`. - `test-without-building -testPlan Unit`, then `-testPlan UI`. The UI plan runs after a Unit failure too, so one round trip reports both. diff --git a/.claude/skills/fix-issue/references/verification-apple.md b/.claude/skills/fix-issue/references/verification-apple.md index e63300c7be..09348a4fd2 100644 --- a/.claude/skills/fix-issue/references/verification-apple.md +++ b/.claude/skills/fix-issue/references/verification-apple.md @@ -85,7 +85,7 @@ Read this when a verdict, a test name or a red CI check needs explaining. The co - `package [regex]` runs `swift test --parallel` with an xunit file. SwiftPM writes the XCTest xunit file only for a parallel run. A package with a `Package.resolved` also gets `--force-resolved-versions`. - A `Package.resolved` written by one toolchain can fail `--force-resolved-versions` on another when a transitive dependency was renamed. Re-pinning only moves the failure; drop the dependency or remove the rename from the graph. - `ios ...` runs `TableProMobileTests` on the first available iPhone simulator with `-parallel-testing-enabled NO -skipPackagePluginValidation CODE_SIGNING_ALLOWED=NO ARCHS=arm64`. `ARCHS=arm64` is there because the prebuilt iOS libraries have arm64 simulator slices only. -- `ios` generates the iOS project when the tree has none. It needs `TableProMobile/Secrets.xcconfig`, which `worktree.sh` links. +- `ios` generates the iOS project when the tree has none. ## Lint @@ -107,7 +107,7 @@ Read this when a verdict, a test name or a red CI check needs explaining. The co ## Worktrees -- `.claude/skills/fix-issue/scripts/worktree.sh [base]` creates `.claude/worktrees/` from a fresh fetch of the base, `origin/main` by default. It links `Configs/Secrets.xcconfig`, `TableProMobile/Secrets.xcconfig`, `Libs/*.a`, `Libs/dylibs`, `Libs/ios/*.xcframework` and the native bridge outputs from the main checkout, and prints the path to pass as `--root`. Run `generate` before its first build. +- `.claude/skills/fix-issue/scripts/worktree.sh [base]` creates `.claude/worktrees/` from a fresh fetch of the base, `origin/main` by default. It links `Configs/Secrets.xcconfig`, `Libs/*.a`, `Libs/dylibs`, `Libs/ios/*.xcframework` and the native bridge outputs from the main checkout, and prints the path to pass as `--root`. Run `generate` before its first build. - `worktree.sh --prune-merged [--dry-run]` removes each tree whose pull requests are all merged or closed, with its DerivedData folder. It removes one only when `git status` is clean and no process has its working directory inside; a kept tree says why. A Codex broker started in a tree is the usual process that keeps it. - `worktree.sh --remove ` keeps the branch and refuses a tree with uncommitted or untracked changes. - Each tree builds into its own DerivedData. `build`, `plugins`, `test`, `uitest` and `ios` wait only for an `xcodebuild` of the same checkout, found by its project path or working directory, so `--no-wait` is safe in your own tree. diff --git a/.claude/skills/fix-issue/scripts/worktree.sh b/.claude/skills/fix-issue/scripts/worktree.sh index d25499663d..b87c84a9a3 100755 --- a/.claude/skills/fix-issue/scripts/worktree.sh +++ b/.claude/skills/fix-issue/scripts/worktree.sh @@ -124,11 +124,7 @@ link() { ln -sfn "$1" "$2" } -# The build reads Configs/Secrets.xcconfig. A stale empty Secrets.xcconfig at the repo root -# used to be linked instead, so every fresh worktree failed with "Unable to open base -# configuration reference file" until it was linked by hand. link "$MAIN_ROOT/Configs/Secrets.xcconfig" "$DIR/Configs/Secrets.xcconfig" -link "$MAIN_ROOT/TableProMobile/Secrets.xcconfig" "$DIR/TableProMobile/Secrets.xcconfig" mkdir -p "$DIR/Libs" for archive in "$MAIN_ROOT"/Libs/*.a; do [ -e "$archive" ] && ln -sf "$archive" "$DIR/Libs/$(basename "$archive")" diff --git a/.gitattributes b/.gitattributes index 294b0c2698..9ce661c79d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -47,5 +47,3 @@ Plugins/*/C*/include/** linguist-vendored TablePro/Core/SSH/CLibSSH2/** linguist-vendored Packages/TableProGrammars/Sources/TreeSitterGrammars/** linguist-vendored - -.github/workflows/*.lock.yml linguist-generated=true merge=ours diff --git a/.github/workflows/macos-tests.yml b/.github/workflows/macos-tests.yml index f49202810a..20c02d75cd 100644 --- a/.github/workflows/macos-tests.yml +++ b/.github/workflows/macos-tests.yml @@ -61,10 +61,6 @@ jobs: GH_TOKEN: ${{ github.token }} run: scripts/download-libs.sh - # Tests read no analytics key; the project only needs the variable to resolve. - - name: Create Secrets.xcconfig - run: echo "ANALYTICS_HMAC_SECRET = " > Configs/Secrets.xcconfig - - name: Generate the Xcode project run: scripts/generate-project.sh macos diff --git a/.gitignore b/.gitignore index 3755a87273..f3055e59e9 100644 --- a/.gitignore +++ b/.gitignore @@ -92,18 +92,6 @@ Carthage/Build/ Dependencies/ .accio/ -# fastlane -# -# It is recommended to not store the screenshots in the git repo. -# Instead, use fastlane to re-generate the screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots/**/*.png -fastlane/test_output - # Code Injection # # After new calculation, remove the following line @@ -140,7 +128,6 @@ Thumbs.db *.p12 *.mobileprovision Secrets.xcconfig -Local.xcconfig # Debug *.log diff --git a/Plugins/CassandraDriverPlugin/Info.plist b/Plugins/CassandraDriverPlugin/Info.plist index 2a3f80f788..88fdb3660c 100644 --- a/Plugins/CassandraDriverPlugin/Info.plist +++ b/Plugins/CassandraDriverPlugin/Info.plist @@ -2,24 +2,6 @@ - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - $(PRODUCT_MODULE_NAME).CassandraPlugin TableProPluginKitVersion 39 diff --git a/Plugins/RedisDriverPlugin/Info.plist b/Plugins/RedisDriverPlugin/Info.plist index 535609076b..e2085f42ec 100644 --- a/Plugins/RedisDriverPlugin/Info.plist +++ b/Plugins/RedisDriverPlugin/Info.plist @@ -2,24 +2,6 @@ - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - $(PRODUCT_MODULE_NAME).RedisPlugin TableProPluginKitVersion 39 TableProProvidesDatabaseTypeIds diff --git a/README.md b/README.md index 66a7a39f80..2ba0ead57b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@

Website · Docs · - Download · + Download · Discord

@@ -70,9 +70,6 @@ TablePro is the missing fourth: native, multi-database, and open source. ## Supported Databases -- **Built-in**: MySQL, MariaDB, TiDB, OceanBase, Databend, PostgreSQL, Amazon Redshift, CockroachDB, PGlite, SQLite, ClickHouse, Redis -- **Plugin**: Microsoft SQL Server, MongoDB, Oracle Database, Snowflake, BigQuery, Spanner, DynamoDB, DuckDB, Cassandra, ScyllaDB, Elasticsearch, Kafka, Trino, Teradata, SAP HANA, Dameng DM8, SurrealDB, Typesense, Weaviate, etcd, Cloudflare D1, Cloudflare R2 SQL, libSQL, Turso, Beancount - Built-in drivers ship with the app. Plugin drivers install on demand from the [plugin registry](https://github.com/TableProApp/plugins). [tablepro.app/databases](https://tablepro.app/databases) has the current list and what each engine supports. ## What's inside @@ -103,7 +100,7 @@ Plans and prices are on [tablepro.app/pricing](https://tablepro.app/pricing). Th brew install --cask tablepro ``` -Or download from [GitHub Releases](https://github.com/TableProApp/TablePro/releases). +Or download from [GitHub Releases](https://github.com/TableProApp/TablePro/releases/latest). ## How to Build diff --git a/TablePro/Info.plist b/TablePro/Info.plist index 230752ac92..376238ace1 100644 --- a/TablePro/Info.plist +++ b/TablePro/Info.plist @@ -547,17 +547,6 @@ NSExceptionRequiresForwardSecrecy
- jsdelivr.net - - NSIncludesSubdomains - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionMinimumTLSVersion - TLSv1.2 - NSExceptionRequiresForwardSecrecy - - NSUserActivityTypes diff --git a/TablePro/Resources/ThirdPartyLicenses/licenses.yml b/TablePro/Resources/ThirdPartyLicenses/licenses.yml index 0cda2cacf6..029dea3b2f 100644 --- a/TablePro/Resources/ThirdPartyLicenses/licenses.yml +++ b/TablePro/Resources/ThirdPartyLicenses/licenses.yml @@ -121,11 +121,10 @@ at 2.17.1. The holder line is quoted from the per-file header of src/session.cpp; README.md at the tag states the same as "© DataStax, Inc." under "## License". The archive statically includes vendored src/third_party/{curl, hdr_histogram, http-parser, minizip, mt19937_64, rapidjson, sparsehash}, - each under its own licence. Those sub-licences are NOT enumerated here: UNVERIFIED. build-cassandra.sh:83 + each under its own licence. Those sub-licences are NOT enumerated here: UNVERIFIED. build-cassandra.sh rewrites the upstream CMakeLists.txt in place with sed to accept AppleClang. That is a build-system edit made inside the script, not a file under scripts/patches/, so patched is false but the tree is - not byte-identical to upstream. The build uses Homebrew openssl@3 (build-cassandra.sh:99), not the - pinned OpenSSL.' + not byte-identical to upstream. The build uses Homebrew openssl@3, not the pinned OpenSSL.' - id: dracula-visual-studio-code name: Dracula Theme Official version: vendored at a08a206f2, 2026-09-14 @@ -153,7 +152,7 @@ source: sh:DUCKDB_VERSION patched: false platforms: [macos, ios] - notes: 'Built from the v1.5.2 git tag with CMake (build-duckdb.sh:25), linking core_functions, json, + notes: 'Built from the v1.5.2 git tag with CMake, linking core_functions, json, parquet, icu and autocomplete statically (scripts/duckdb-macos-extensions.cmake). The build compiles the whole tree including third_party/, which holds 30 vendored projects (brotli, catch, concurrentqueue, fast_float, fastpforlib, fmt, fsst, httplib, hyperloglog, imdb, jaro_winkler, jemalloc, libpg_query, @@ -184,13 +183,13 @@ (LGPL-2.0), not 2.1. Every source file built into libsybdb.a grants "either version 2 of the License, or (at your option) any later version", so LGPL-2.0-or-later is the id. The repo also ships COPYING.txt (GPL-2.0) for parts of the tree; the build compiles only include, src/utils, src/replacements, src/tds - and src/dblib (build-freetds.sh:123-128), so no GPL-only component is linked. README.md at the tag + and src/dblib, so no GPL-only component is linked. README.md at the tag states "FreeTDS is licensed under the GNU LGPL license. See COPYING_LIB.txt". src/replacements carries separate BSD-3-Clause code, hence the Regents of the University of California lines (src/replacements/getopt.c, quoted with its original tab indentation). Per-contributor credits live in AUTHORS.md at the tag; the headers above are the ones on the files actually compiled. The build fetches the tarball from - https://www.freetds.org/files/stable/freetds-1.4.22.tar.gz (build-freetds.sh:24), SHA-256 pinned at - line 23; the GitHub tag v1.4.22 is the same release. The patch adds the TDS FEDAUTH login extension + https://www.freetds.org/files/stable/freetds-1.4.22.tar.gz, pinned by SHA-256; the GitHub tag + v1.4.22 is the same release. The patch adds the TDS FEDAUTH login extension (Microsoft Entra ID) that upstream has never implemented; it is TablePro-authored and applies to LGPL sources, so the modified library stays LGPL-2.0-or-later and the modification must be offered alongside. Static-linked LGPL: same relinking obligation as MariaDB Connector/C. One source tree serves the macOS @@ -216,20 +215,20 @@ ships.' - id: go name: Go (runtime and standard library) - version: 1.27.1 + version: 1.27.2 spdx: BSD-3-Clause copyrights: - Copyright 2009 The Go Authors homepageURL: https://go.dev - licenseTextURL: https://github.com/golang/go/blob/go1.27.1/LICENSE + licenseTextURL: https://github.com/golang/go/blob/go1.27.2/LICENSE textFile: texts/go.txt source: manual patched: false - notes: 'The toolchain line of Native/HanaBridge/go.mod pins go1.27.1. scripts/build-hana.sh builds + notes: 'The toolchain line of Native/HanaBridge/go.mod pins go1.27.2. scripts/build-hana.sh builds the bridge into tablepro-hana-helper, a CGO_ENABLED=0 executable the SAP HANA plugin carries in Contents/MacOS and runs as a separate process, so the Go runtime and every standard library package the helper reaches are linked into that executable. The standard - library vendors golang.org/x/crypto, x/net, x/sys and x/text (src/vendor/modules.txt at go1.27.1), + library vendors golang.org/x/crypto, x/net, x/sys and x/text (src/vendor/modules.txt at go1.27.2), all under this same BSD-3-Clause notice from The Go Authors. PATENTS beside LICENSE is an extra patent grant from Google and adds no notice duty. source is manual because the pin lives in go.mod, not in a build-*.sh variable, so scripts/ci/check-license-inventory.py does not check this version. @@ -313,11 +312,8 @@ notes: 'COPYING at the tag names only the first two holders plus "All rights reserved."; the remaining five lines are per-file headers on sources compiled into the two archives: ssl.c (Redis Labs, 2019), sds.c (Sanfilippo 2006-2015, Oran Agra, Redis Labs, Inc) and alloc.c (Michael Grunder). All are the - same BSD-3-Clause grant. Tarball is the GitHub source archive for v1.2.0 (build-hiredis.sh:70), SHA-256 - pinned at line 39. The script writes only the _arch and _universal archives; the flat Libs/libhiredis.a - and Libs/libhiredis_ssl.a that project.yml force_loads are copied by hand before publishing, the same - as libssh2.a, libpq.a, libpgcommon.a, libpgport.a, libssl.a and libcrypto.a. scripts/ios/build-hiredis-ios.sh:13 - pins the same 1.2.0.' + same BSD-3-Clause grant. Tarball is the GitHub source archive for v1.2.0, pinned by SHA-256. + scripts/ios/build-hiredis-ios.sh pins the same 1.2.0.' - id: libssh2 name: libssh2 version: 1.11.1 @@ -339,13 +335,10 @@ patched: true platforms: [macos, ios] notes: Linked by the main app target (SSH tunnels), not by a plugin. The tarball is fetched from the - GitHub release for libssh2-1.11.1 and pinned by SHA-256 (build-libssh2.sh:38). The script writes only - libssh2_arm64.a, libssh2_x86_64.a and libssh2_universal.a. The flat Libs/libssh2.a that project.yml - force_loads is listed in Libs/checksums.sha256 but is not written by build-libssh2.sh nor by publish-libs.sh; - it is copied by hand before publishing. Both patches are TablePro-authored CVE backports carrying + GitHub release for libssh2-1.11.1 and pinned by SHA-256. Both patches are TablePro-authored CVE backports carrying their own prose headers; the 1.11.1 tree they modify stays BSD-3-Clause. The repo also ships a LICENSES/ directory (BSD-2-Clause, BSD-3-Clause, FSFULLR, MIT, SAX-PD-2.0, curl) for REUSE compliance, covering - build and doc files rather than the library sources. scripts/ios/build-libssh2-ios.sh:9 pins the same + build and doc files rather than the library sources. scripts/ios/build-libssh2-ios.sh pins the same 1.11.1 for the iOS app. - id: libuv name: libuv @@ -360,8 +353,8 @@ source: sh:LIBUV_VERSION patched: false notes: 'libuv is not pinned by a script of its own; it is a dependency of the Cassandra driver and is - pinned inside scripts/build-cassandra.sh. Tarball comes from dist.libuv.org (build-cassandra.sh:39), - SHA-256 pinned at line 12. Two licence files apply at v1.48.0. LICENSE is the MIT grant for libuv + pinned inside scripts/build-cassandra.sh. Tarball comes from dist.libuv.org, pinned by SHA-256. Two + licence files apply at v1.48.0. LICENSE is the MIT grant for libuv itself; LICENSE-extra is the same MIT grant carried over from the joyent/libuv history, which is why the Joyent / Node contributors line must also be reproduced. LICENSE-extra additionally names two externally maintained pieces that ship inside the archive: tree.h from FreeBSD, "copyright Niels Provos. @@ -393,7 +386,7 @@ with its original continuation indentation. The PHP attribution line is quoted from the README at the tag and is a required notice because the connector derives from PHP''s mysqlnd extension. Static-linked LGPL: shipping the app must keep the relinking route open (object files or the shipped .a plus the - licence text). The build uses Homebrew openssl@3 (build-mariadb.sh:22), not the pinned OpenSSL. scripts/ios/build-mariadb-ios.sh:13 + licence text). The build uses Homebrew openssl@3, not the pinned OpenSSL. scripts/ios/build-mariadb-ios.sh pins the same 3.4.4.' - id: mongo-c-driver name: MongoDB C Driver (libmongoc / libbson) @@ -412,8 +405,8 @@ binary ships: uthash ("Copyright (c) 2003-2021, Troy D. Hanson"), common-b64.c (ISC, "Copyright: 1996, 1998 Internet Software Consortium / 1995 International Business Machines, Inc." plus an IBM permission grant), mongoc.css_t, zlib, common-md5.c and utf8proc. The full text is saved in the extra text file. - Tarball is the GitHub release archive for 1.28.1 (build-libmongoc.sh:74), SHA-256 pinned at line 42. - The script writes the flat Libs/libmongoc.a and Libs/libbson.a itself (build-libmongoc.sh:219).' + Tarball is the GitHub release archive for 1.28.1, pinned by SHA-256. The script writes the flat + Libs/libmongoc.a and Libs/libbson.a itself.' - id: nord-visual-studio-code name: Nord Visual Studio Code version: vendored at 8ead09822, 2023-05-03 @@ -494,9 +487,9 @@ at the tag is the bare Apache-2.0 text with no copyright block, so the two holder lines above are quoted from the Copyright section of README.md at the same tag (https://raw.githubusercontent.com/openssl/openssl/openssl-3.4.3/README.md, lines 196-203). Source files carry the per-file form "Copyright The OpenSSL Project Authors. - All Rights Reserved." scripts/openssl-version.sh is sourced by build-libssh2.sh:37, build-hiredis.sh:38, - build-libmongoc.sh:43 and build-libpq.sh:39, each of which builds OpenSSL from source for its own - static link. Only build-libpq.sh installs the result into Libs/ (libpq.sh:196-197). scripts/create-openssl-dylibs.sh + All Rights Reserved." OPENSSL_VERSION in scripts/lib/common.sh is the pin for build-libssh2.sh, + build-hiredis.sh, build-libmongoc.sh and build-libpq.sh, each of which builds OpenSSL from source for + its own static link. Only build-libpq.sh installs the result into Libs/. scripts/create-openssl-dylibs.sh turns those static archives into the two shipped dylibs. build-mariadb.sh, build-cassandra.sh and build-freetds.sh use Homebrew's openssl@3 instead of the pin, so their OpenSSL version is whatever brew has installed (UNVERIFIED at build time; the shipped dylibs are the pinned 3.4.3). @@ -541,11 +534,11 @@ source: sh:PG_VERSION patched: false platforms: [macos, ios] - notes: Source tarball comes from ftp.postgresql.org (build-libpq.sh:71), SHA-256 pinned at build-libpq.sh:40; + notes: Source tarball comes from ftp.postgresql.org, pinned by SHA-256 in scripts/build-libpq.sh; the GitHub tag REL_17_4 is the same release and is used here only as a stable URL for the COPYRIGHT file. The COPYRIGHT text is the whole licence; SPDX calls it "PostgreSQL" (a BSD/MIT-style permissive licence), not BSD-2-Clause. The same build also emits Libs/libssl_*.a and Libs/libcrypto_*.a, which - are OpenSSL, not PostgreSQL. scripts/ios/build-libpq-ios.sh:10 pins the same 17.4. + are OpenSSL, not PostgreSQL. scripts/ios/build-libpq-ios.sh pins the same 17.4. - id: rearrange name: Rearrange version: 2.1.1 diff --git a/project.yml b/project.yml index 3565b0736a..e46c688d19 100644 --- a/project.yml +++ b/project.yml @@ -485,7 +485,7 @@ targets: SKIP_INSTALL: YES LOCALIZATION_EXPORT_SUPPORTED: NO SWIFT_EMIT_LOC_STRINGS: YES - # The app and all 41 plugin bundles link this framework, and every one of those links + # The app and every plugin bundle link this framework, and every one of those links # waits for its link step without this. It is Swift-only, so the build system can emit a # TBD and unblock them. EAGER_LINKING: YES diff --git a/scripts/lib/common.sh b/scripts/lib/common.sh index 088104f81a..81191e421f 100644 --- a/scripts/lib/common.sh +++ b/scripts/lib/common.sh @@ -6,9 +6,7 @@ # source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../lib/common.sh" # iOS builds # # Holds only what both the macOS and the iOS builds use. The macOS-only helpers live in macos.sh, -# which sources this. Every function here was copied between scripts before, and the copies had -# drifted: `run_quiet` existed in four variants across nine files, three of them hiding which -# command had failed. +# which sources this. # # shellcheck shell=bash # shellcheck source-path=SCRIPTDIR @@ -30,9 +28,6 @@ OPENSSL_VERSION="3.4.3" OPENSSL_SHA256="fa727ed1399a64e754030a033435003991aee36bda9a5b080995cb2ac5cf7f37" # Runs a command silently and shows its output only when it fails. -# -# Names the command as well as showing the tail: the variants that printed only a tail left you -# guessing which of a dozen configure and make invocations had produced it. run_quiet() { local logfile logfile=$(mktemp) @@ -45,20 +40,6 @@ run_quiet() { rm -f "$logfile" } -# Fails with one message listing everything missing, rather than dying on the first absence -# partway through a twenty minute build. -require_tools() { - local tool missing=() - for tool in "$@"; do - command -v "$tool" > /dev/null 2>&1 || missing+=("$tool") - done - if [ "${#missing[@]}" -gt 0 ]; then - echo "ERROR: missing required tool(s): ${missing[*]}" >&2 - echo " install them and run this again" >&2 - return 1 - fi -} - # Verifies a downloaded file against a checksum the caller pins. verify_sha256() { local file="$1" expected="$2"