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: # Changelog:
* **17.11.18**
- Improved PPT handling
* **04.11.18** * **04.11.18**
- Added basic music bot management (Create | Delete | Nickname/Description-change) - Added basic music bot management (Create | Delete | Nickname/Description-change)
- Merged music bot pause and play. Added stop button - Merged music bot pause and play. Added stop button

View File

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

View File

@ -1,13 +1,15 @@
#!/usr/bin/env bash #!/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_FILE_NAME="TeaSpeakUI.tar.gz"
TMP_DIR_NAME="tmp" TMP_DIR_NAME="tmp"
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
cd "$BASEDIR/../" cd "$BASEDIR/../"
if [ "$#" -ne 2 ]; then if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters" echo "Illegal number of parameters (url | channel | required version)"
exit 1 exit 1
fi fi
@ -73,6 +75,7 @@ cd ../../../
RESP=$(curl \ RESP=$(curl \
-k \ -k \
-X POST \ -X POST \
-F "required_client=$3" \
-F "type=deploy-ui-build" \ -F "type=deploy-ui-build" \
-F "channel=$2" \ -F "channel=$2" \
-F "version=$APPLICATION_VERSION" \ -F "version=$APPLICATION_VERSION" \