aboutsummaryrefslogtreecommitdiffstats
path: root/sh/test-template.sh
diff options
context:
space:
mode:
authorLibravatar David <david003@gmx.net>2022-07-15 17:33:27 +0200
committerLibravatar David <david003@gmx.net>2022-07-15 17:33:27 +0200
commita46a91e183a272e012354a6f0263299448205acb (patch)
treeb0700f933db7149c1b95afed2e04d53772f7e2dc /sh/test-template.sh
download2022-a46a91e183a272e012354a6f0263299448205acb.tar.gz
2022-a46a91e183a272e012354a6f0263299448205acb.tar.bz2
2022-a46a91e183a272e012354a6f0263299448205acb.zip
initial commit: template
Diffstat (limited to '')
-rw-r--r--sh/test-template.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/sh/test-template.sh b/sh/test-template.sh
new file mode 100644
index 0000000..b20040e
--- /dev/null
+++ b/sh/test-template.sh
@@ -0,0 +1,27 @@
+GAME=my-awesome-game
+GODOT_VER=3.2
+template_directory=$PWD
+git branch
+tree -a "${template_directory}"
+rustup component add clippy rustfmt
+cargo install cargo-generate --features vendored-openssl
+if [ ! -f /tmp/godot.zip ]; then
+ wget "https://downloads.tuxfamily.org/godotengine/$GODOT_VER/Godot_v${GODOT_VER}-stable_linux_headless.64.zip" -O /tmp/godot.zip
+fi
+if [ ! -d /tmp/godot_bin ]; then
+ unzip /tmp/godot.zip -d /tmp/godot_bin
+fi
+export PATH=$PATH:/tmp/godot_bin/
+cd /tmp || exit 1
+rm -rf ${GAME}
+cargo generate --git "${template_directory}" --name "${GAME}" --branch "${TRAVIS_BRANCH}"
+cd "${GAME}" || exit 1
+cargo fmt --all -- --check
+cargo clippy --all --all-features -- -D clippy::style -D clippy::complexity -D clippy::perf -D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented
+make build-x86_64-unknown-linux-gnu-debug
+tree -a lib/
+"Godot_v${GODOT_VER}-stable_linux_headless.64" --path godot/ &
+run_pid=$!
+echo ${run_pid}
+sleep 5
+kill -9 ${run_pid}