mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 09:03:37 +00:00
* Disable rust version checking in tgs precompile.sh hook (#81319) Updates tgs/precompile.sh hook to match what is deployed on campbell. rust-lang/cargo#12654 has set a policy of setting this to be the latest version-2, which kills any kind of signal this could have ever had. cargo's subcrates like `home` are used in almost any complex rust package, so this basically sets the tone for all packages and all crates published after October 8th. A min compiler version should be based on an actual need to use a specific compiler version because of specific features that version has or bugs that version doesn't have. This is signal. Setting to some evergreen value as a matter of course is not signal, its noise. I will not subject myself nor our downstreams to such nonsense. * Disable rust version checking in tgs precompile.sh hook --------- Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
39 lines
908 B
Bash
Executable File
39 lines
908 B
Bash
Executable File
#!/bin/bash
|
|
|
|
./InstallDeps.sh
|
|
|
|
set -e
|
|
set -x
|
|
|
|
#load dep exports
|
|
#need to switch to game dir for Dockerfile weirdness
|
|
original_dir=$PWD
|
|
cd "$1"
|
|
. dependencies.sh
|
|
cd "$original_dir"
|
|
|
|
|
|
# update rust-g
|
|
if [ ! -d "rust-g" ]; then
|
|
echo "Cloning rust-g..."
|
|
git clone https://github.com/tgstation/rust-g
|
|
cd rust-g
|
|
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
|
|
else
|
|
echo "Fetching rust-g..."
|
|
cd rust-g
|
|
git fetch
|
|
~/.cargo/bin/rustup target add i686-unknown-linux-gnu
|
|
fi
|
|
|
|
echo "Deploying rust-g..."
|
|
git checkout "$RUST_G_VERSION"
|
|
env PKG_CONFIG_ALLOW_CROSS=1 ~/.cargo/bin/cargo build --ignore-rust-version --release --target=i686-unknown-linux-gnu
|
|
mv target/i686-unknown-linux-gnu/release/librust_g.so "$1/librust_g.so"
|
|
cd ..
|
|
|
|
# compile tgui
|
|
echo "Compiling tgui..."
|
|
cd "$1"
|
|
env TG_BOOTSTRAP_CACHE="$original_dir" TG_BOOTSTRAP_NODE_LINUX=1 CBT_BUILD_MODE="TGS" tools/bootstrap/node tools/build/build.js
|