From 059e6016b200ca835b9e56a00a042186f861d859 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 27 Oct 2021 07:44:57 +0100 Subject: [PATCH 1/9] Release v21.4.0 --- lgsm/functions/core_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 5f2f4d8832..2ecc472789 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v21.3.3" +modulesversion="v21.4.0" # Core From f2af7c1e1b7da38fdbf6181f70f83d1cfcb071f2 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 27 Oct 2021 22:07:30 +0100 Subject: [PATCH 2/9] feat(action): check that linuxgsm.sh and modules version match will prevent version mismatch issues on release from not correctly setting versions. convert to tabs --- .github/workflows/version-check.sh | 14 ++++++++++++++ .github/workflows/version-check.yml | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/version-check.sh create mode 100644 .github/workflows/version-check.yml diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh new file mode 100644 index 0000000000..44215385d8 --- /dev/null +++ b/.github/workflows/version-check.sh @@ -0,0 +1,14 @@ +version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="') +modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g'| tr -d '="') + +if [ "${version}" != "${modulesversion}" ]; then + echo "Error! LinuxGSM version mismatch" + echo "Version: ${version}" + echo "Modules Version: ${modulesversion}" + exit 1 +else + echo "Success! LinuxGSM version match" + echo "Version: ${version}" + echo "Modules Version: ${modulesversion}" + exit +fi diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml new file mode 100644 index 0000000000..861653135e --- /dev/null +++ b/.github/workflows/version-check.yml @@ -0,0 +1,23 @@ +# This is a basic workflow to help you get started with Actions + +name: Version Check + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: push + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + Version-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: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: compare versions + run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh \ No newline at end of file From ae0043c607094a671a65cd8888edccd2da693482 Mon Sep 17 00:00:00 2001 From: johnoclockdk <68790186+johnoclockdk@users.noreply.github.com> Date: Fri, 29 Oct 2021 13:41:30 +0200 Subject: [PATCH 3/9] fix(sf): fix port startparameter (#3650) Change in the documentation on Satisfactory Game Server Wiki regarding how ports work --- lgsm/config-default/config-lgsm/sfserver/_default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg index e27899793a..229eb1f0b4 100644 --- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg @@ -15,7 +15,7 @@ beaconport="15000" port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="FactoryGame -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -GamePort=${port} -log -unattended" +startparameters="FactoryGame -ServerQueryPort=${queryport} -BeaconPort=${beaconport} -Port=${port} -log -unattended" #### LinuxGSM Settings #### From ac9bfdb71c04ccadfdf812b87ccf381b08387d44 Mon Sep 17 00:00:00 2001 From: johnoclockdk <68790186+johnoclockdk@users.noreply.github.com> Date: Fri, 29 Oct 2021 23:09:13 +0200 Subject: [PATCH 4/9] fix(Minecraft): remove motd color from servername (#3652) will remove any motd colours from being displayed on the command line --- lgsm/functions/info_game.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 106b1b4ee8..6f8c7d2099 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -803,7 +803,7 @@ fn_info_game_mc(){ gamemode="${unavailable}" gameworld="${unavailable}" else - servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') + servername=$(grep "motd" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/motd//g' | tr -d '=\";,:' | sed 's/\\u00A70//g;s/\\u00A71//g;s/\\u00A72//g;s/\\u00A73//g;s/\\u00A74//g;s/\\u00A75//g;s/\\u00A76//g;s/\\u00A77//g;s/\\u00A78//g;s/\\u00A79//g;s/\\u00A7a//g;s/\\u00A7b//g;s/\\u00A7c//g;s/\\u00A7d//g;s/\\u00A7e//g;s/\\u00A7f//g;s/\\u00A7l//g;s/\\u00A7o//g;s/\\u00A7n//g;s/\\u00A7m//g;s/\\u00A7k//g' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconpassword=$(grep "rcon.password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/rcon.password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') rconport=$(grep "rcon.port" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') maxplayers=$(grep "max-players" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') From fb2d5544105ee749a78df0d796f173b8ccebfec0 Mon Sep 17 00:00:00 2001 From: Claiyc <58397976+Claiyc@users.noreply.github.com> Date: Fri, 29 Oct 2021 23:13:37 +0200 Subject: [PATCH 5/9] fix: add sf & lo to info_game (#3653) --- lgsm/functions/info_game.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index 6f8c7d2099..d6b526c574 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -790,6 +790,14 @@ fn_info_game_kf2(){ defaultmap=${defaultmap:-"NOT SET"} } +fn_info_game_lo(){ + # Parameters + servername=${servername:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + maxplayers=${slots:-"0"} +} + fn_info_game_mc(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -1550,6 +1558,14 @@ fn_info_game_sdtd(){ fi } +fn_info_game_sf(){ + # Parameters + servername=${selfname:-"NOT SET"} + port=${port:-"0"} + queryport=${queryport:-"0"} + beaconport=${beaconport:-"0"} +} + fn_info_game_sof2(){ # Config if [ ! -f "${servercfgfullpath}" ]; then @@ -2230,6 +2246,8 @@ elif [ "${shortname}" == "kf" ]; then fn_info_game_kf elif [ "${shortname}" == "kf2" ]; then fn_info_game_kf2 +elif [ "${shortname}" == "lo" ]; then + fn_info_game_lo elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then fn_info_game_mc elif [ "${shortname}" == "mcb" ]; then @@ -2280,6 +2298,8 @@ elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then fn_info_game_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_game_sdtd +elif [ "${shortname}" == "sf" ]; then + fn_info_game_sf elif [ "${shortname}" == "sof2" ]; then fn_info_game_sof2 elif [ "${shortname}" == "sol" ]; then From e0488d51aba28f60b9ebf9d510f261871e654a08 Mon Sep 17 00:00:00 2001 From: Adithya Hegde <57481485+Emperor-Adi@users.noreply.github.com> Date: Sat, 30 Oct 2021 02:46:46 +0530 Subject: [PATCH 6/9] fix: change methods not using their bound instance to static methods (#3582) * Add function decorators to 2 methods Change methods not using their bound instance to static methods --- lgsm/functions/query_gsquery.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 6c21b1a896..93f68cca5d 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -59,10 +59,12 @@ def __init__(self, options, arguments): self.response = None self.sanity_checks() + @staticmethod def fatal_error(self, error_message, error_code=1): sys.stderr.write('ERROR: ' + str(error_message) + '\n') sys.exit(error_code) + @staticmethod def exit_success(self, success_message=''): sys.stdout.write('OK: ' + str(success_message) + '\n') sys.exit(0) @@ -140,6 +142,5 @@ def sanity_checks(self): help='Display debugging output.' ) options, arguments = parser.parse_args() - # server = gsquery(options, arguments) server.responding() From 7ac60f23660e92b69fdd658ed5eb1a144fda9233 Mon Sep 17 00:00:00 2001 From: johnoclockdk <68790186+johnoclockdk@users.noreply.github.com> Date: Fri, 29 Oct 2021 23:48:14 +0200 Subject: [PATCH 7/9] fix(unt): incorrect query port (#3654) * Release v21.4.0 * fix queryport for Unturned * fix queryport remove +1 variable from queryport * Revert "fix queryport for Unturned" This reverts commit 3c1ccf21d70f1d6803b9cc7a5c91197593cd0c5c. * add steamport port+1 Co-authored-by: Daniel Gibbs --- lgsm/functions/info_game.sh | 3 ++- lgsm/functions/info_messages.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/info_game.sh b/lgsm/functions/info_game.sh index d6b526c574..c767fcb78b 100644 --- a/lgsm/functions/info_game.sh +++ b/lgsm/functions/info_game.sh @@ -1943,7 +1943,8 @@ fn_info_game_unt(){ # Parameters servername=${selfname:-"NOT SET"} port=${port:-"0"} - queryport=$((port+1)) + queryport=${port} + steamport=$((port+1)) } fn_info_game_ut(){ diff --git a/lgsm/functions/info_messages.sh b/lgsm/functions/info_messages.sh index 10925c7e9d..0337f2d92e 100755 --- a/lgsm/functions/info_messages.sh +++ b/lgsm/functions/info_messages.sh @@ -800,7 +800,7 @@ fn_info_message_arma3(){ fn_port "header" fn_port "Game" port udp fn_port "Voice" voiceport udp - fn_port "Query Steam" queryport udp + fn_port "Query" queryport udp fn_port "Steam Master" steammasterport udp fn_port "Voice (unused)" voiceunusedport udp fn_port "BattleEye" battleeyeport udp @@ -1517,6 +1517,7 @@ fn_info_message_unt(){ fn_port "header" fn_port "Game" port udp fn_port "Query" queryport udp + fn_port "Steam" steamport udp } | column -s $'\t' -t } From 454e53bb9654548c061fa86893f99142c365186e Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 29 Oct 2021 23:10:12 +0100 Subject: [PATCH 8/9] spaces Release v21.4.1 new line Release v21.4.1 --- .github/workflows/version-check.yml | 4 ++-- lgsm/functions/core_functions.sh | 2 +- lgsm/functions/query_gsquery.py | 4 ++-- linuxgsm.sh | 2 +- tests/tests_fctrserver.sh | 2 +- tests/tests_jc2server.sh | 2 +- tests/tests_mcserver.sh | 2 +- tests/tests_ts3server.sh | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index 861653135e..903a79268a 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -17,7 +17,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - + # Runs a single command using the runners shell - name: compare versions - run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh \ No newline at end of file + run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 2ecc472789..725cd297b1 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -8,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v21.4.0" +modulesversion="v21.4.1" # Core diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 93f68cca5d..4d6b018287 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -59,12 +59,12 @@ def __init__(self, options, arguments): self.response = None self.sanity_checks() - @staticmethod + @staticmethod def fatal_error(self, error_message, error_code=1): sys.stderr.write('ERROR: ' + str(error_message) + '\n') sys.exit(error_code) - @staticmethod + @staticmethod def exit_success(self, success_message=''): sys.stdout.write('OK: ' + str(success_message) + '\n') sys.exit(0) diff --git a/linuxgsm.sh b/linuxgsm.sh index 4cd9d45325..1eff0d00f3 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.0" +version="v21.4.1" shortname="core" gameservername="core" commandname="CORE" diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 5d88e30262..138864098d 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.0" +version="v21.4.1" shortname="fctr" gameservername="fctrserver" commandname="CORE" diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 5512d608e6..86637f5b25 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.0" +version="v21.4.1" shortname="jc2" gameservername="jc2server" commandname="CORE" diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index b027e9db33..447b8b9e3a 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.0" +version="v21.4.1" shortname="mc" gameservername="mcserver" commandname="CORE" diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 418ce00aef..3c160f009a 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.4.0" +version="v21.4.1" shortname="ts3" gameservername="ts3server" commandname="CORE" From 6fc99cfbac3a59a3faf83541d78c9e3f06c2d6ed Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 29 Oct 2021 23:12:03 +0100 Subject: [PATCH 9/9] remove release drafter --- .github/release-drafter.yml | 29 --------------------------- .github/workflows/release-drafter.yml | 29 --------------------------- 2 files changed, 58 deletions(-) delete mode 100644 .github/release-drafter.yml delete mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 609c1d8cb3..0000000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,29 +0,0 @@ -version-template: 'v21.$MINOR.$PATCH' -name-template: '$RESOLVED_VERSION' -tag-template: '$RESOLVED_VERSION' -categories: - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - label: 'chore' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. -version-resolver: - minor: - labels: - - 'release' - patch: - labels: - - 'hotfix' - default: patch -template: | - ## Changes - - $CHANGES diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 442f6dc41c..0000000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Release Drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - master - # pull_request event is required only for autolabeler - pull_request: - # Only following types are handled by the action, but one can default to all as well - types: [opened, reopened, synchronize] - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - # (Optional) GitHub Enterprise requires GHE_HOST variable set - #- name: Set GHE_HOST - # run: | - # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV - - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 - # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml - # with: - # config-name: my-config.yml - # disable-autolabeler: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}