Added UI pack required client handling

canary
WolverinDEV 2018-11-19 19:05:42 +01:00
parent 789f9eb709
commit a8ffc73ab5
3 changed files with 13 additions and 5 deletions

View File

@ -1,4 +1,7 @@
# Changelog:
* **17.11.18**
- Improved PPT handling
* **04.11.18**
- Added basic music bot management (Create | Delete | Nickname/Description-change)
- Merged music bot pause and play. Added stop button

View File

@ -153,7 +153,8 @@
"timestamp" => $data["latest"]["timestamp"],
"version" => $data["latest"]["version"],
"git-ref" => $data["latest"]["git-ref"],
"channel" => $channel
"channel" => $channel,
"required_client" => $data["latest"]["required_client"]
];
array_push($info["versions"], $channel_info);
}
@ -274,7 +275,7 @@
} else if($_POST["type"] == "deploy-ui-build") {
global $UI_BASE_PATH;
if(!isset($_POST["secret"]) || !isset($_POST["channel"]) || !isset($_POST["version"]) || !isset($_POST["git_ref"]))
if(!isset($_POST["secret"]) || !isset($_POST["channel"]) || !isset($_POST["version"]) || !isset($_POST["git_ref"]) || !isset($_POST["required_client"]))
error_exit("Missing required information!");
$path = $UI_BASE_PATH . DIRECTORY_SEPARATOR;
@ -305,7 +306,8 @@
"timestamp" => time(),
"file" => $channeled_path . DIRECTORY_SEPARATOR . $filename,
"version" => $_POST["version"],
"git-ref" => $_POST["git_ref"]
"git-ref" => $_POST["git_ref"],
"required_client" => $_POST["required_client"]
];
$channel_info["latest"] = $entry;

View File

@ -1,13 +1,15 @@
#!/usr/bin/env bash
# ./scripts/deploy_ui_files.sh http://dev.clientapi.teaspeak.de/api.php test 1.1.0
TMP_FILE_NAME="TeaSpeakUI.tar.gz"
TMP_DIR_NAME="tmp"
BASEDIR=$(dirname "$0")
cd "$BASEDIR/../"
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters"
if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters (url | channel | required version)"
exit 1
fi
@ -73,6 +75,7 @@ cd ../../../
RESP=$(curl \
-k \
-X POST \
-F "required_client=$3" \
-F "type=deploy-ui-build" \
-F "channel=$2" \
-F "version=$APPLICATION_VERSION" \