From a62288e5886a45906426084e0b23ae57e5e3f5e9 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 16 Oct 2026 13:01:25 -0700 Subject: Lockfile from Bun 1.3.14; deploy into an ordinary clone The lockfile was written by a newer Bun than the pinned image can read. The deploy hook now keeps its checkout as a normal clone of the deploy repo, because submodule commands need a working tree of their own. Co-Authored-By: Claude Opus 5.5 --- bun.lock | 2 +- deploy/post-receive | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bun.lock b/bun.lock index 173d544..b71c015 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,5 @@ { - "lockfileVersion": 2, + "lockfileVersion": 1, "configVersion": 1, "workspaces": { "": { diff --git a/deploy/post-receive b/deploy/post-receive index 78e4ba2..b6b0b29 100755 --- a/deploy/post-receive +++ b/deploy/post-receive @@ -17,13 +17,16 @@ while read -r oldrev newrev ref; do [ "$ref" = refs/heads/prod ] || continue { echo "== $(date -u +%FT%TZ) deploy $newrev" - mkdir -p "$CHECKOUT" - git --git-dir="$BARE" --work-tree="$CHECKOUT" checkout -f "$newrev" || { echo "checkout failed"; exit 1; } - cd "$CHECKOUT" || exit 1 + # the checkout is an ordinary clone of this repo, so submodules work + unset GIT_DIR + [ -d "$CHECKOUT/.git" ] || git clone -q --no-checkout "$BARE" "$CHECKOUT" || { echo "clone failed"; exit 1; } + git -C "$CHECKOUT" fetch -q origin || { echo "fetch failed"; exit 1; } + git -C "$CHECKOUT" checkout -q -f --detach "$newrev" || { echo "checkout failed"; exit 1; } # the pinned coinosv3 commit comes from the coinosv3 repo on this host - env -u GIT_DIR git -C "$CHECKOUT" --git-dir="$BARE" --work-tree="$CHECKOUT" \ - -c submodule.coinosv3.url=/home/adam/coinosv3.git -c protocol.file.allow=always \ - submodule update --init --force || { echo "submodule update failed"; exit 1; } + git -C "$CHECKOUT" config submodule.coinosv3.url /home/adam/coinosv3.git + git -C "$CHECKOUT" -c protocol.file.allow=always submodule update --init --force -q \ + || { echo "submodule update failed"; exit 1; } + cd "$CHECKOUT" || exit 1 docker run --rm -v "$CHECKOUT":/app -w /app oven/bun:1.3.14 bun install --frozen-lockfile --production \ || { echo "bun install failed"; exit 1; } -- cgit v1.2.3