1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-12-21 23:48:08 +00:00

added new variable "platforms"

This commit is contained in:
Patrizio Bekerle 2017-06-03 10:35:21 +02:00
parent 98a2ba591d
commit ec4381bf05
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 24 additions and 11 deletions

View file

@ -3,7 +3,8 @@
"identifier": "example-script",
"script": "example-script.qml",
"authors": ["@pbek"],
"version": "0.0.1",
"minAppVersion": "17.05.6",
"platforms": ["linux", "macos", "windows"],
"version": "0.0.2",
"minAppVersion": "17.06.2",
"description" : "Use this script to start a new script you want to submit to the script repository.\n\nJust copy the whole <i>example-script</i> folder from the git-repository on GitHub and rename both the folder and <i>example-script.qml</i>."
}

View file

@ -61,6 +61,18 @@ class TestHelper {
$errors[] = "No version was entered!";
}
if (isset($data["platforms"])) {
if (!is_array($data["platforms"])) {
$errors[] = "'platforms' has to be an array!";
} else {
foreach ($data["platforms"] as $platform) {
if (!in_array($platform, array("linux", "macos", "windows"))) {
$errors[] = "Unsupported platform '$platform', only 'linux', 'macos' and 'windows' are allowed!";
}
}
}
}
if (count($errors) > 0) {
$this->errors[$dir] = $errors;
}