mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 12:15:38 +00:00
CI: support delete plugin
This commit is contained in:
parent
b9683c2d9f
commit
4991fda439
@ -10,6 +10,7 @@ for file in main["files"]:
|
|||||||
exit()
|
exit()
|
||||||
if "/main.py" in file["filename"]:
|
if "/main.py" in file["filename"]:
|
||||||
plugins.append(file["filename"].split("/")[0])
|
plugins.append(file["filename"].split("/")[0])
|
||||||
|
delete = bool(main['commit']['message'].startswith("Delete:"))
|
||||||
|
|
||||||
with open("list.json", "r", encoding="utf8") as f:
|
with open("list.json", "r", encoding="utf8") as f:
|
||||||
list_json = json.load(f)
|
list_json = json.load(f)
|
||||||
@ -20,6 +21,8 @@ for plugin in plugins:
|
|||||||
exist = True
|
exist = True
|
||||||
old_version = float(plug_dict["version"])
|
old_version = float(plug_dict["version"])
|
||||||
list_json["list"][list_json["list"].index(plug_dict)]["version"] = str(old_version + 0.01)
|
list_json["list"][list_json["list"].index(plug_dict)]["version"] = str(old_version + 0.01)
|
||||||
|
if delete:
|
||||||
|
list_json["list"].remove(plug_dict)
|
||||||
break
|
break
|
||||||
if not exist:
|
if not exist:
|
||||||
list_json["list"].append(
|
list_json["list"].append(
|
||||||
|
Loading…
Reference in New Issue
Block a user