Skip to content

Commit b2d9634

Browse files
fix: worker-build install (#52)
1 parent df8a5ee commit b2d9634

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

confidence-cloudflare-resolver/deployer/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
FROM rust:1.82 AS rust-base
1+
FROM rust:1.86 AS rust-base
22

3-
RUN rustup update stable && rustup target add wasm32-unknown-unknown
3+
RUN rustup toolchain install 1.86.0 && \
4+
rustup default 1.86.0 && \
5+
rustup target add wasm32-unknown-unknown
46

57
# Execute next commands in the directory /workspace
68
WORKDIR /workspace
@@ -49,7 +51,9 @@ RUN node -v && npm -v
4951
RUN npm install -g wrangler@latest
5052

5153
# Pre-install the Rust worker build tool so wrangler doesn't run cargo install at deploy-time
52-
RUN cargo install worker-build --locked || true
54+
ARG WORKER_BUILD_VERSION="0.1.11"
55+
ENV WORKER_BUILD_VERSION=${WORKER_BUILD_VERSION}
56+
RUN cargo install worker-build --locked --version ${WORKER_BUILD_VERSION}
5357

5458
ENV PATH=/usr/local/bin:$PATH
5559
ENV PATH=/usr/local/cargo/bin:$PATH

confidence-cloudflare-resolver/deployer/script.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@ DEPLOYER_VERSION=""
150150
if [ -n "${COMMIT_SHA:-}" ]; then
151151
DEPLOYER_VERSION="$(printf '%s' "$COMMIT_SHA" | tr -d '\n' | cut -c1-12)"
152152
echo "🔖 Deployer version (env): ${DEPLOYER_VERSION}"
153-
elif command -v git >/dev/null 2>&1; then
153+
elif [ -d .git ] && command -v git >/dev/null 2>&1; then
154154
if DEPLOYER_VERSION=$(git rev-parse --short=12 HEAD 2>/dev/null); then
155155
echo "🐙 Deployer version (commit): ${DEPLOYER_VERSION}"
156156
else
157-
echo "git rev-parse failed"
157+
echo "ℹ️ No git metadata available; skipping deployer version"
158158
fi
159159
else
160-
echo "❌ git not found in PATH and COMMIT_SHA not set"
160+
echo "ℹ️ Deployer version not set (no COMMIT_SHA or git metadata)"
161161
fi
162162

163163

0 commit comments

Comments
 (0)