Clone upstream at build time; drop submodules; single httptoolkit binary
Build & Release binary / build (push) Failing after 17m21s
Build & Release binary / build (push) Failing after 17m21s
This commit is contained in:
Executable
+29
@@ -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."
|
||||
Reference in New Issue
Block a user