1
0
mirror of https://github.com/parkervcp/eggs.git synced 2024-10-06 23:57:07 +02:00

Fix download with there new release

This commit is contained in:
Quinten 2022-11-07 17:27:38 +01:00 committed by GitHub
parent 0066e4ab00
commit cec0fcf798
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-10-29T13:13:41+02:00",
"exported_at": "2022-11-07T17:26:47+01:00",
"name": "BeamMP Servers",
"author": "noah@noahserver.online",
"description": "This is the server for the multiplayer mod BeamMP for the game BeamNG.drive. The server is the point through which all clients communicate. You can write lua mods for the server, detailed instructions on the BeamMP Wiki.",
@ -22,7 +22,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n#Remove any old versions\r\nrm -f BeamMP-Server\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest BeamMP server version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\")\r\nelse\r\n echo -e \"Chosen version :${VERSION}. Verifying version from releases\"\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i \"${MATCH}\")\r\n else\r\n echo -e \"No valid versions found. Defaulting to the latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i Server-linux)\r\n fi\r\nfi\r\n\r\n#Download the BeamMP server binary\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\"\r\ncurl -L ${DOWNLOAD_URL} -o BeamMP-Server\r\nchmod +x BeamMP-Server\r\n\r\n#Create a default configuration file\r\necho \"[HTTP]\r\n# Recommended to keep enabled. With SSL the server will serve https and requires valid key and cert files\r\nUseSSL = true\r\n# Enables the internal HTTP server\r\nHTTPServerEnabled = false\r\nSSLKeyPath = \\\".\/.ssl\/HttpServer\/key.pem\\\"\r\nHTTPServerPort = 8080\r\nSSLCertPath = \\\".\/.ssl\/HttpServer\/cert.pem\\\"\r\n\r\n[General]\r\n# If SendErrors is `true`, the server will send helpful info about crashes and other issues back to the BeamMP developers. This info may include your config, who is on your server at the time of the error, and similar general information. This kind of data is vital in helping us diagnose and fix issues faster. This has no impact on server performance. You can opt-out of this system by setting this to `false`\r\nSendErrorsShowMessage = true\r\nName = \\\"BeamMP Server\\\"\r\nPort = 30814\r\nResourceFolder = \\\"Resources\\\"\r\n# AuthKey has to be filled out in order to run the server\r\nAuthKey = \\\"\\\"\r\nPrivate = true\r\nMaxPlayers = 10\r\nDebug = false\r\nDescription = \\\"BeamMP Default Description\\\"\r\nMaxCars = 1\r\nMap = \\\"\/levels\/gridmap_v2\/info.json\\\"\r\n# You can turn on\/off the SendErrors message you get on startup here\r\nSendErrors = true\" > ServerConfig.toml\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"script": "#!\/bin\/bash\r\n#Create the server directory\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n#Remove any old versions\r\nrm -f BeamMP-Server\r\n\r\n#Check for latest release & download URLs\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/BeamMP\/BeamMP-Server\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n echo -e \"Using latest BeamMP server version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i \"${MATCH}\" | head -1)\r\nelse\r\n echo -e \"Chosen version :${VERSION}. Verifying version from releases\"\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i \"${MATCH}\" | head -1)\r\n else\r\n echo -e \"No valid versions found. Defaulting to the latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i Server-linux | head -1)\r\n fi\r\nfi\r\n\r\n#Download the BeamMP server binary\r\necho -e \"Running curl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\"\r\ncurl -sSL ${DOWNLOAD_URL} -o BeamMP-Server\r\nchmod +x BeamMP-Server\r\n\r\n#Create a default configuration file\r\necho \"[HTTP]\r\n# Recommended to keep enabled. With SSL the server will serve https and requires valid key and cert files\r\nUseSSL = true\r\n# Enables the internal HTTP server\r\nHTTPServerEnabled = false\r\nSSLKeyPath = \\\".\/.ssl\/HttpServer\/key.pem\\\"\r\nHTTPServerPort = 8080\r\nSSLCertPath = \\\".\/.ssl\/HttpServer\/cert.pem\\\"\r\n\r\n[General]\r\n# If SendErrors is `true`, the server will send helpful info about crashes and other issues back to the BeamMP developers. This info may include your config, who is on your server at the time of the error, and similar general information. This kind of data is vital in helping us diagnose and fix issues faster. This has no impact on server performance. You can opt-out of this system by setting this to `false`\r\nSendErrorsShowMessage = true\r\nName = \\\"BeamMP Server\\\"\r\nPort = 30814\r\nResourceFolder = \\\"Resources\\\"\r\n# AuthKey has to be filled out in order to run the server\r\nAuthKey = \\\"\\\"\r\nPrivate = true\r\nMaxPlayers = 10\r\nDebug = false\r\nDescription = \\\"BeamMP Default Description\\\"\r\nMaxCars = 1\r\nMap = \\\"\/levels\/gridmap_v2\/info.json\\\"\r\n# You can turn on\/off the SendErrors message you get on startup here\r\nSendErrors = true\" > ServerConfig.toml\r\n\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\"",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
@ -100,12 +100,12 @@
},
{
"name": "Match",
"description": "The match we have to do on there github package.\r\n\r\nCurrently the have a special build for debian 11, what is the docker image we use.\r\nGo to https:\/\/github.com\/BeamMP\/BeamMP-Server\/releases if the version you want has a asset \"BeamMP-Server-debian11\" then select \"BeamMP-Server-debian11\" if not then \"BeamMP-Server-linux\"",
"description": "The match we have to do on there github package.\r\n\r\nCurrently, they have a special build for debian 11, what is the docker image we use.\r\nGo to https:\/\/github.com\/BeamMP\/BeamMP-Server\/releases if the version you want has an asset \"debian\" then select \"Server-debian\" if not then \"Server-linux\"",
"env_variable": "MATCH",
"default_value": "BeamMP-Server-debian11",
"default_value": "Server-debian",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:BeamMP-Server-debian11,BeamMP-Server-linux",
"rules": "required|string|in:Server-debian,Server-linux",
"field_type": "text"
}
]