Skip to content

Commit

Permalink
Fix (ci): Fix testing image to work correctly for srcds/csgo
Browse files Browse the repository at this point in the history
Fixes regression in startersclan#153, where validation stopped working for `srcds/csgo`
  • Loading branch information
leojonathanoh committed Nov 16, 2023
1 parent 820b036 commit 2a18d77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ else
DOCKER_REPOSITORY="${DOCKER_REPOSITORY:-${REGISTRY_SOURCE:?err}/$GAME}"
GAME_ENGINE='srcds'
# srcds/cs2
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
GAME_BIN='game/bin/linuxsteamrt64/cs2'
else
GAME_BIN='srcds_linux'
Expand Down Expand Up @@ -270,7 +270,7 @@ if [ ! "$NO_TEST" = 'true' ]; then
time docker run -t --rm "$GAME_IMAGE" 'printenv && ls -al'
date
# srcds/cs2
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
CONTAINER_ID=$( docker run -td "$GAME_IMAGE" "$GAME_BIN -dedicated -port 27015 +map de_dust2" )
i=0; while [ "$i" -lt 30 ]; do
echo "Waiting for server to start"
Expand All @@ -289,7 +289,7 @@ if [ ! "$NO_TEST" = 'true' ]; then
# Verify game version of the game image matches the value of GAME_VERSION
echo 'Verifying game image game version'
GAME_IMAGE_VERSION_LINES=$(
if [ "$APPID" = 730 ]; then
if [ "$APPID" = 730 ] && [ "$GAME" = 'cs2' ]; then
cat "$TEST_DIR/test" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
else
cat "$TEST_DIR/test" | grep -iE '\bexe\b|version'
Expand Down

0 comments on commit 2a18d77

Please sign in to comment.