Skip to content

Commit

Permalink
Move rust installation further down for better flow
Browse files Browse the repository at this point in the history
Seems like build pipeline fails because we remove the osxcross
directory, so might be better to concatenate the path and install
rust a bit later.

Signed-off-by: Alper Polat <[email protected]>
  • Loading branch information
gitperr committed Feb 5, 2024
1 parent 4df814e commit 3131be2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions 1.20/main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ ENV OSXCROSS_PATH=/usr/osxcross \
OSXCROSS_REV=ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b \
SDK_VERSION=14 \
DARWIN_VERSION=23 \
OSX_VERSION_MIN=10.13 \
PATH="/root/.cargo/bin:${PATH}"
OSX_VERSION_MIN=10.13

WORKDIR /tmp/osxcross
RUN \
Expand All @@ -44,11 +43,12 @@ RUN \
&& curl -s -f -L "${PROM_OSX_SDK_URL}/MacOSX${SDK_VERSION}.sdk.tar.xz" -o "tarballs/MacOSX${SDK_VERSION}.sdk.tar.xz" \
&& UNATTENDED=yes JOBS=2 ./build.sh \
&& mv target "${OSXCROSS_PATH}" \
&& rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" \
&& cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign
&& rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man"

WORKDIR /app

ENV PATH $OSXCROSS_PATH/bin:$PATH
ENV PATH /root/.cargo/bin:$OSXCROSS_PATH/bin:$PATH

RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign

COPY rootfs /
10 changes: 5 additions & 5 deletions 1.21/main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ ENV OSXCROSS_PATH=/usr/osxcross \
OSXCROSS_REV=ff8d100f3f026b4ffbe4ce96d8aac4ce06f1278b \
SDK_VERSION=14 \
DARWIN_VERSION=23 \
OSX_VERSION_MIN=10.13 \
PATH="/root/.cargo/bin:${PATH}"
OSX_VERSION_MIN=10.13

WORKDIR /tmp/osxcross
RUN \
Expand All @@ -44,11 +43,12 @@ RUN \
&& curl -s -f -L "${PROM_OSX_SDK_URL}/MacOSX${SDK_VERSION}.sdk.tar.xz" -o "tarballs/MacOSX${SDK_VERSION}.sdk.tar.xz" \
&& UNATTENDED=yes JOBS=2 ./build.sh \
&& mv target "${OSXCROSS_PATH}" \
&& rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man" \
&& cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign
&& rm -rf /tmp/osxcross "/usr/osxcross/SDK/MacOSX${SDK_VERSION}.sdk/usr/share/man"

WORKDIR /app

ENV PATH $OSXCROSS_PATH/bin:$PATH
ENV PATH /root/.cargo/bin:$OSXCROSS_PATH/bin:$PATH

RUN cargo install --git https://github.com/indygreg/apple-platform-rs --branch main --bin rcodesign apple-codesign

COPY rootfs /

0 comments on commit 3131be2

Please sign in to comment.