Update GatekeeperV2 (#444)

* Update GatekeeperV2

Due to changes in how Python and Pip handle packages, this needed a change to use a virtual environment. This won't work in Docker until Mike adds python3-venv to the image, but I suspect it should be resolved shortly.

* Fix issue

* Oopsies
This commit is contained in:
IceOfWraith 2023-08-17 16:54:29 -05:00 committed by GitHub
parent 9842eb03d6
commit 84e61cb749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 2 deletions

View File

@ -20,7 +20,7 @@ App.DisplayName=GatekeeperV2 Bot
App.RootDir=./gatekeeperv2/
App.BaseDirectory=./gatekeeperv2/
App.ExecutableWin=$PATH/python3
App.ExecutableLinux=/usr/bin/python3
App.ExecutableLinux=venv/bin/python3
App.WorkingDir=GatekeeperV2-main
App.LinuxCommandLineArgs=
App.WindowsCommandLineArgs=
@ -54,7 +54,8 @@ App.RCONConnectRetrySeconds=5
App.RCONHeartbeatMinutes=0
App.RCONHeartbeatCommand=ping
App.TelnetLoginFormat={0}
App.UpdateSources=[{"UpdateStageName":"Bot Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://github.com/k8thekat/GatekeeperV2/archive/refs/heads/main.zip","UnzipUpdateSource":true,"OverwriteExistingFiles":true,"DeleteAfterExtract":true},{"UpdateStageName":"Pip & Discord.py Script","UpdateSourcePlatform":"Linux","UpdateSource":"Executable","UpdateSourceData":"/bin/bash","UpdateSourceArgs":"-c \"pip install --upgrade pip && pip install numpy requests && git clone https://github.com/Rapptz/discord.py && cd discord.py && python3 -m pip install discord.py\""}]
App.UpdateSources=@IncludeJson[gatekeepverv2updates.json]
App.PreStartStages=[{"UpdateStageName":"Create Virtual Environment","UpdateSourcePlatform":"Linux","UpdateSource":"Executable","UpdateSourceData":"/bin/bash","UpdateSourceArgs":"-c \"source '{{$FullRootDir}}venv/bin/activate'\""}]
App.Compatibility=None
App.SteamUpdateAnonymousLogin=True
App.SteamForceLoginPrompt=False

25
gatekeepverv2updates.json Normal file
View File

@ -0,0 +1,25 @@
[
{
"UpdateStageName": "Bot Download",
"UpdateSourcePlatform": "All",
"UpdateSource": "FetchURL",
"UpdateSourceData": "https://github.com/k8thekat/GatekeeperV2/archive/refs/heads/main.zip",
"UnzipUpdateSource": true,
"OverwriteExistingFiles": true,
"DeleteAfterExtract": true
},
{
"UpdateStageName": "Create Virtual Environment",
"UpdateSourcePlatform": "Linux",
"UpdateSource": "Executable",
"UpdateSourceData": "/bin/bash",
"UpdateSourceArgs": "-c \"rm -rf '{{$FullRootDir}}venv' && /usr/bin/python3 -m venv '{{$FullRootDir}}venv'\""
},
{
"UpdateStageName": "Pip & Discord.py Script",
"UpdateSourcePlatform": "Linux",
"UpdateSource": "Executable",
"UpdateSourceData": "/bin/bash",
"UpdateSourceArgs": "-c \"source '{{$FullRootDir}}venv/bin/activate' && python3 -m pip install --upgrade pip && python3 -m pip install numpy requests && git clone https://github.com/Rapptz/discord.py && cd discord.py && python3 -m pip install discord.py\""
}
]