better version selection for vanilla bedrock

Changing to grabbing the download url from the minecraft bedrock download page directly.
This commit is contained in:
Michael (Parker) Parker 2018-10-27 23:03:25 -04:00
parent 03cec424f6
commit 6948db8323

View File

@ -3,7 +3,7 @@
"meta": { "meta": {
"version": "PTDL_v1" "version": "PTDL_v1"
}, },
"exported_at": "2018-10-17T21:11:34-04:00", "exported_at": "2018-10-27T23:02:35-04:00",
"name": "Vanilla Bedrock", "name": "Vanilla Bedrock",
"author": "parker@parkervcp.com", "author": "parker@parkervcp.com",
"description": "Bedrock Edition (also known as the Bedrock Version, Bedrock Codebase, Bedrock Engine or just Bedrock) refers to the multi-platform family of editions of Minecraft developed by Mojang AB, Microsoft Studios, 4J Studios, and SkyBox Labs. Prior to this term, as the engine originated with Pocket Edition, this entire product family was referred to as \"Pocket Edition\", \"MCPE\", or \"Pocket\/Windows 10 Edition\".", "description": "Bedrock Edition (also known as the Bedrock Version, Bedrock Codebase, Bedrock Engine or just Bedrock) refers to the multi-platform family of editions of Minecraft developed by Mojang AB, Microsoft Studios, 4J Studios, and SkyBox Labs. Prior to this term, as the engine originated with Pocket Edition, this entire product family was referred to as \"Pocket Edition\", \"MCPE\", or \"Pocket\/Windows 10 Edition\".",
@ -17,7 +17,7 @@
}, },
"scripts": { "scripts": {
"installation": { "installation": {
"script": "#!\/bin\/ash\r\n\r\napk add --no-cache zip unzip wget\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"Downloading files from https:\/\/minecraft.azureedge.net\/bin-linux\/bedrock-server-$BEDROCK_VERSION.zip\"\r\nwget https:\/\/minecraft.azureedge.net\/bin-linux\/bedrock-server-$BEDROCK_VERSION.zip\r\n\r\necho -e \"Unpacking server files\"\r\nunzip bedrock-server-$BEDROCK_VERSION.zip\r\n\r\necho -e \"Done\"", "script": "#!\/bin\/ash\r\n\r\napk add --no-cache zip unzip wget\r\n\r\ncd \/mnt\/server\r\n\r\necho -e \"Downloading files from https:\/\/minecraft.azureedge.net\/bin-linux\/bedrock-server-$BEDROCK_VERSION.zip\"\r\n\r\nif [ -z \"${BEDROCK_VERSION}\" ] || [ \"${BEDROCK_VERSION}\" == \"latest\" ]; then\r\n echo -e \"\\n Downloading latest Bedrock server\"\r\n DOWNLOAD_URL=$(curl https:\/\/minecraft.net\/en-us\/download\/server\/bedrock\/ | grep azureedge | grep linux | grep -Eo \"(http|https):\/\/[a-zA-Z0-9.\/?=_-]*\")\r\n BEDROCK_VERSION=$(echo ${DOWNLOAD_URL} | cut -d\"\/\" -f5)\r\nelse \r\n echo -e \"\\n Downloading ${BEDROCK_VERSION} Bedrock server\"\r\n DOWNLOAD_URL=https:\/\/minecraft.azureedge.net\/bin-linux\/bedrock-server-$BEDROCK_VERSION.zip\r\nfi\r\n\r\nwget ${DOWNLOAD_URL}\r\n\r\necho -e \"Unpacking server files\"\r\nunzip bedrock-server-$BEDROCK_VERSION.zip\r\n\r\necho -e \"Done\"",
"container": "alpine:3.8", "container": "alpine:3.8",
"entrypoint": "ash" "entrypoint": "ash"
} }
@ -25,9 +25,9 @@
"variables": [ "variables": [
{ {
"name": "Bedrock Version", "name": "Bedrock Version",
"description": "The version of bedrock", "description": "The version of bedrock. (Ex. 1.7.0.13)\r\n\r\nDefault version is latest.",
"env_variable": "BEDROCK_VERSION", "env_variable": "BEDROCK_VERSION",
"default_value": "1.6.1.0", "default_value": "latest",
"user_viewable": 1, "user_viewable": 1,
"user_editable": 1, "user_editable": 1,
"rules": "required|string|max:20" "rules": "required|string|max:20"