mirror of
https://github.com/godotengine/build-containers.git
synced 2025-12-31 21:48:41 +03:00
Mono: Allow specifying fixed git hash and pretty image version
Specifying only a branch like '2019-08' is problematic if upstream commits something between the builds of two containers. We could make a tarball in the first container build and reuse that, but we need the flexibility of Git for some patching in the Android and JavaScript builds, so instead we allow specifying a git tree-ish as the third argument. We can therefore also give a pretty version string to use for the image name as second argument, e.g. 6.6.0.160 for bef1e6335812d32f8eab648c0228fc624b9f8357. As we can't `git clone` a commit hash directly, we still need to provide both branch name and then commit hash for this use case.
This commit is contained in:
@@ -2,6 +2,7 @@ ARG img_version
|
||||
FROM godot-mono:${img_version}
|
||||
|
||||
ARG mono_version
|
||||
ARG mono_commit
|
||||
|
||||
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
|
||||
dnf -y install --setopt=install_weak_deps=False \
|
||||
@@ -9,7 +10,9 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand
|
||||
dnf clean all
|
||||
|
||||
RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \
|
||||
cd mono && git submodule update --init && \
|
||||
cd /root/mono && \
|
||||
if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \
|
||||
git submodule update --init && \
|
||||
NOCONFIGURE=1 ./autogen.sh && \
|
||||
./configure --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 --disable-boehm --disable-mcs-build --disable-executables && \
|
||||
echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
|
||||
@@ -27,7 +30,7 @@ RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-bra
|
||||
echo '#define HAVE_STRUCT_SOCKADDR_IN6 1' >> config.h && \
|
||||
make -j && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
cd /root && \
|
||||
cp /root/dependencies/mono-32/bin/libMonoPosixHelper.dll /root/dependencies/mono-32/bin/MonoPosixHelper.dll && \
|
||||
rm -f /root/dependencies/mono-32/bin/mono /root/dependencies/mono-32/bin/mono-sgen && \
|
||||
ln -s /usr/bin/mono /root/dependencies/mono-32/bin/mono && \
|
||||
|
||||
Reference in New Issue
Block a user