From 061e61e21d4011c69f99f293c4c717ed038b4f46 Mon Sep 17 00:00:00 2001 From: Plata Date: Thu, 15 Mar 2018 17:37:40 +0100 Subject: [PATCH 1/3] validate: testingOperatingSystems must be a subset of compatibleOperatingSystems --- validate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/validate.py b/validate.py index af35675700..c549595b76 100644 --- a/validate.py +++ b/validate.py @@ -116,6 +116,10 @@ with open(script_json_file) as f: script_json = json.loads(f.read().decode("utf-8-sig")) jsonschema.validate(script_json, script_schema) + # check that testingOperatingSystems is a subset of compatibleOperatingSystems + if not set(script_json['testingOperatingSystems']) < set(script_json['compatibleOperatingSystems']): + print "{}: testingOperatingSystems must be a subset of compatibleOperatingSystems".format(script_json_file) + is_valid = False except ValueError as value_error: print "invalid script.json {}: {}".format(script_json_file, value_error) is_valid = False From 6bac5cec9f803af8d2f482757f472b10346d7f28 Mon Sep 17 00:00:00 2001 From: Plata Date: Thu, 15 Mar 2018 17:42:39 +0100 Subject: [PATCH 2/3] doesn't have to be a true subset --- validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate.py b/validate.py index c549595b76..403c883702 100644 --- a/validate.py +++ b/validate.py @@ -117,7 +117,7 @@ script_json = json.loads(f.read().decode("utf-8-sig")) jsonschema.validate(script_json, script_schema) # check that testingOperatingSystems is a subset of compatibleOperatingSystems - if not set(script_json['testingOperatingSystems']) < set(script_json['compatibleOperatingSystems']): + if not set(script_json['testingOperatingSystems']) <= set(script_json['compatibleOperatingSystems']): print "{}: testingOperatingSystems must be a subset of compatibleOperatingSystems".format(script_json_file) is_valid = False except ValueError as value_error: From a2ab2fc8d7bf78da49cdb7ff9bf8aaea2a4398bb Mon Sep 17 00:00:00 2001 From: Plata Date: Thu, 15 Mar 2018 17:46:11 +0100 Subject: [PATCH 3/3] fixed incorrect script.json files --- .../Games/Assassin's Creed: Brotherhood/Steam/script.json | 2 +- Applications/Games/Far Cry 3 - Blood Dragon/Uplay/script.json | 2 +- Applications/Games/PAYDAY The Heist/Steam/script.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.json b/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.json index 978cbdce9e..4949df029b 100644 --- a/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.json +++ b/Applications/Games/Assassin's Creed: Brotherhood/Steam/script.json @@ -1,6 +1,6 @@ { "scriptName": "Steam", - "compatibleOperatingSystems": ["LINUX"], + "compatibleOperatingSystems": ["MACOSX", "LINUX"], "testingOperatingSystems": ["MACOSX"], "free": false, "requiresPatch": false diff --git a/Applications/Games/Far Cry 3 - Blood Dragon/Uplay/script.json b/Applications/Games/Far Cry 3 - Blood Dragon/Uplay/script.json index bae8191bdb..bd5c110a74 100644 --- a/Applications/Games/Far Cry 3 - Blood Dragon/Uplay/script.json +++ b/Applications/Games/Far Cry 3 - Blood Dragon/Uplay/script.json @@ -1,6 +1,6 @@ { "scriptName": "Uplay", - "compatibleOperatingSystems": [], + "compatibleOperatingSystems": ["LINUX"], "testingOperatingSystems": ["LINUX"], "free": false, "requiresPatch": false diff --git a/Applications/Games/PAYDAY The Heist/Steam/script.json b/Applications/Games/PAYDAY The Heist/Steam/script.json index 978cbdce9e..4949df029b 100644 --- a/Applications/Games/PAYDAY The Heist/Steam/script.json +++ b/Applications/Games/PAYDAY The Heist/Steam/script.json @@ -1,6 +1,6 @@ { "scriptName": "Steam", - "compatibleOperatingSystems": ["LINUX"], + "compatibleOperatingSystems": ["MACOSX", "LINUX"], "testingOperatingSystems": ["MACOSX"], "free": false, "requiresPatch": false