Clone upstream at build time; drop submodules; single httptoolkit binary
Build & Release binary / build (push) Failing after 17m21s

This commit is contained in:
2026-08-15 03:15:19 +05:00
parent f6d9b67044
commit f201d5bf9c
9 changed files with 53 additions and 96 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
# Apply our patches + overlay onto the cloned upstream repos.
# Fails loudly if a patch no longer applies (upstream moved).
#
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
apply_patches() {
local name="$1" dir="$2"
[ -d "patches/$name" ] || return 0
echo "==> [$name] applying patches"
for patch in patches/"$name"/*.patch; do
[ -e "$patch" ] || continue
echo " - $(basename "$patch")"
git -C "$dir" apply --3way "$ROOT/$patch"
done
}
apply_patches ui httptoolkit-ui
apply_patches server httptoolkit-server
echo "==> Copying overlay into httptoolkit-server"
cp -v overlay/server/htk-entry.ts httptoolkit-server/htk-entry.ts
cp -v overlay/server/src/htk-app.ts httptoolkit-server/src/htk-app.ts
cp -v overlay/server/src/commands/app.ts httptoolkit-server/src/commands/app.ts
echo "==> patch.sh complete."