Browse Source

first test of details checking

pull/4200/head
Daniel Gibbs 2 years ago
parent
commit
51f47d4bfb
  1. 29
      .github/workflows/details-check.yml
  2. 10
      lgsm/modules/command_dev_details.sh

29
.github/workflows/details-check.yml

@ -0,0 +1,29 @@
name: Details Check
# This action will check that LinuxGSM is picking up game server config and parameter variables.
on:
workflow_dispatch:
push:
jobs:
# This workflow contains a single job called "build"
details-check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/linuxgsm.sh; chmod +x linuxgsm.sh
- name: Grab server
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh csgoserver
- name: Enable developer mode
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./csgoserver developer
- name: Download config
run: wget https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master/CounterStrikeGlobalOffensive/server.cfg
- name: Check details
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./csgoserver detect-details server.cfg

10
lgsm/modules/command_dev_details.sh

@ -5,6 +5,10 @@
# Website: https://linuxgsm.com
# Description: Dev only: Enables debugging log to be saved to dev-debug.log.
if [ -f "${2}" ]; then
servercfgfullpath="${2}"
fi
info_game.sh
carriagereturn=$(file -b "${servercfgfullpath}" | grep -q CRLF && echo "${red}CRLF${default}" || echo "${lightgreen}LF${default}")
@ -49,15 +53,15 @@ declare -A server_details=(
['Sharding']="${sharding}"
['Steam Auth Port']="${steamauthport}"
['Steam Master Port']="${steammasterport}"
['Telnet IP']="${telnetip}"
['Tickrate']="${tickrate}"
['Web Admin IP']="${webadminip}"
['Web Admin Enabled']="${webadminenabled}"
['Web Admin IP']="${webadminip}"
['Web Admin Password']="${webadminpass}"
['Web Admin User']="${webadminuser}"
['Web Admin Port']="${webadminport}"
['Web Admin User']="${webadminuser}"
['World Name']="${worldname}"
['World Type']="${worldtype}"
['Telnet IP']="${telnetip}"
)
# Initialize a variable to keep track of missing server details.

Loading…
Cancel
Save