From feb03de76f33d61656a8bcda7d69cb9671076859 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 18 Jan 2021 19:52:23 +0100 Subject: [PATCH] [MIRROR] Fix Docker build failing on a clean checkout (#2732) * Fix Docker build failing on a clean checkout * Update Dockerfile * Update Dockerfile * Update node * Update Dockerfile * Update node * Update run_server.sh * Update deploy.sh Co-authored-by: Tad Hardesty Co-authored-by: Gandalf --- .dockerignore | 5 ++--- Dockerfile | 5 ++--- tools/bootstrap/node | 3 ++- tools/ci/run_server.sh | 1 - tools/deploy.sh | 4 +++- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9c6ac6b4aa6..a4b8a25cdc8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,7 +22,6 @@ tgstation.int tgstation.rsc tgstation.lk tgstation.dyn.rsc -libmariadb.dll -rust_g.dll -BSQL.dll +*.dll Dockerfile +tools/bootstrap/.cache diff --git a/Dockerfile b/Dockerfile index eda82165bb1..c40c8aa6488 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,8 +41,7 @@ RUN apt-get install -y --no-install-recommends \ COPY . . RUN env TG_BOOTSTRAP_NODE_LINUX=1 tools/build/build \ - && tools/deploy.sh /deploy \ - && rm /deploy/*.dll + && tools/deploy.sh /deploy # rust = base + rustc and i686 target FROM base AS rust @@ -83,4 +82,4 @@ COPY --from=rust_g /rust_g/target/i686-unknown-linux-gnu/release/librust_g.so ./ VOLUME [ "/tgstation/config", "/tgstation/data" ] ENTRYPOINT [ "DreamDaemon", "tgstation.dmb", "-port", "1337", "-trusted", "-close", "-verbose" ] -EXPOSE 1337 +EXPOSE 1337 \ No newline at end of file diff --git a/tools/bootstrap/node b/tools/bootstrap/node index b8acdbb3d22..676325fb789 100755 --- a/tools/bootstrap/node +++ b/tools/bootstrap/node @@ -32,6 +32,7 @@ if [ "$(uname)" = "Linux" ] || [ ! -f "$NodeExe" ]; then NodeExe="$NodeDir/node" if [ ! -f "$NodeExe" ]; then + mkdir -p "$Cache" Archive="$(realpath "$Cache/node-v$NodeVersion.tar.gz")" curl "https://nodejs.org/download/release/v$NodeVersion/$NodeFullVersion.tar.gz" -o "$Archive" (cd "$Cache" && tar xf "$Archive") @@ -80,4 +81,4 @@ exec 4>&1 PATH="$(readlink -f "$NodeDir"):$PATH" # Set PATH so that recursive calls find it exitstatus=$({ { set +e; "$NodeExe" "$@" 2>&1 3>&-; printf %s $? >&3; } 4>&- | tee -a "$Log" 1>&4; } 3>&1) exec 4>&- -exit "$exitstatus" +exit "$exitstatus" \ No newline at end of file diff --git a/tools/ci/run_server.sh b/tools/ci/run_server.sh index f54c541bf66..4d943846f04 100644 --- a/tools/ci/run_server.sh +++ b/tools/ci/run_server.sh @@ -2,7 +2,6 @@ set -euo pipefail tools/deploy.sh ci_test -rm ci_test/*.dll mkdir ci_test/config #test config diff --git a/tools/deploy.sh b/tools/deploy.sh index 1729ca493c3..f9aafa67532 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -32,4 +32,6 @@ cp -r strings/* $1/strings/ #find $1/_maps -name "*.dm" -type f -delete #dlls on windows -cp *.dll $1/ || true +if [ "$(uname -o)" = "Msys" ]; then + cp ./*.dll $1/ +fi