Skip to content

Commit

Permalink
Fix architecture checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergeek77 authored Nov 17, 2024
1 parent a6e2c61 commit db44de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-backend
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN --mount=type=cache,target=/lemmy/target set -ex; \
# Release build
RUN --mount=type=cache,target=/lemmy/target set -ex; \
# Build with 16 codegen units 32-bit architectures due to build issues
if [[ "$(getconf LONG_BIT)" == "32" ]]; then \
if [ "$(getconf LONG_BIT)" = "32" ]; then \
RUSTFLAGS='RUSTFLAGS=-Ccodegen-units=16'; \
fi; \
if [ "${RUST_RELEASE_MODE}" = "release" ]; then \
Expand All @@ -44,7 +44,7 @@ RUN --mount=type=cache,target=/lemmy/target set -ex; \

# Compress the binary with upx
# Skip this step on 32-but architectures
if [[ "$(getconf LONG_BIT)" == "64" ]]; then \
if [ "$(getconf LONG_BIT)" = "64" ]; then \
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-${TARGETARCH}_linux.tar.xz; \
tar -xvf upx-4.2.4-${TARGETARCH}_linux.tar.xz; \
cp upx-4.2.4-${TARGETARCH}_linux/upx /usr/bin; \
Expand Down

0 comments on commit db44de4

Please sign in to comment.