From a0694843029299b43560af4b0e09f2555ee23cf0 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Fri, 10 Nov 2023 19:50:45 +0000 Subject: [PATCH] Add test --- .github/workflows/ci-master-pr.yml | 8 ++++++++ test/test-game-image-game-version.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 98409e72..87d29f90 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -46,6 +46,14 @@ jobs: STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} + test-game-image-game-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Test + run: | + ./test/test-game-image-game-version.sh + update-draft-release: needs: - test-build-hlds diff --git a/test/test-game-image-game-version.sh b/test/test-game-image-game-version.sh index 7fa23875..f55cf919 100755 --- a/test/test-game-image-game-version.sh +++ b/test/test-game-image-game-version.sh @@ -4,5 +4,11 @@ set -eu SCRIPT_DIR=$( cd $( dirname "$0" ) && pwd ) cd "$SCRIPT_DIR" -for i in $( ls hlds-* ); do echo "[$i]"; cat "$i" | grep -iE '\bexe\b|version' | sed 's/[^0-9]//g'; echo; done -for i in $( ls srcds-* ); do echo "[$i]"; cat "$i" | grep -iE '\bexe\b|version' | sed 's/[^0-9]//g'; echo; done +for i in $( ls hlds-* srcds-* | grep -v srcds-cs2 ); do + echo + echo "[$i]" + cat "$i" | grep -iE '\bexe\b|version' + echo + echo "Detected versions:" + cat "$i" | grep -iE '\bexe\b|version' | sed 's/[^0-9]//g' +done