Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only use --debug if DEBUG=true #195

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ ARG EFI_IMG_SIZE=2200

# internal variables
ARG GOLANG_VERSION=1.22
ARG DEBUG=false

IF [ "$OS_DISTRIBUTION" = "ubuntu" ] && [ "$BASE_IMAGE" = "" ]
IF [ "$OS_VERSION" == 22 ] || [ "$OS_VERSION" == 20 ]
Expand Down Expand Up @@ -347,7 +348,9 @@ build-uki-iso:
WORKDIR /build
COPY --platform=linux/${ARCH} --keep-own +iso-image-rootfs/rootfs /build/image
IF [ "$ARCH" = "arm64" ]
RUN /entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --debug --output /iso/ --arch $ARCH
RUN CMD="/entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --output /iso/ --arch $ARCH" && \
if [ "$DEBUG" = "true" ]; then CMD="$CMD --debug"; else CMD="$CMD"; fi && \
$CMD
ELSE IF [ "$ARCH" = "amd64" ]
COPY secure-boot/enrollment/ secure-boot/private-keys/ secure-boot/public-keys/ /keys
RUN ls -liah /keys
Expand Down Expand Up @@ -398,9 +401,13 @@ build-iso:
fi

IF [ "$ARCH" = "arm64" ]
RUN /entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --debug --output /iso/ --arch $ARCH
RUN CMD="/entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --output /iso/ --arch $ARCH" && \
if [ "$DEBUG" = "true" ]; then CMD="$CMD --debug"; else CMD="$CMD"; fi && \
$CMD
ELSE IF [ "$ARCH" = "amd64" ]
RUN /entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --debug --output /iso/ --arch x86_64
RUN CMD="/entrypoint.sh --name $ISO_NAME build-iso --date=false --overlay-iso /overlay dir:/build/image --output /iso/ --arch x86_64" && \
if [ "$DEBUG" = "true" ]; then CMD="$CMD --debug"; else CMD="$CMD"; fi && \
$CMD
END
WORKDIR /iso
RUN sha256sum $ISO_NAME.iso > $ISO_NAME.iso.sha256
Expand Down