mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 11:42:49 +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()
|
||||
if "/main.py" in file["filename"]:
|
||||
plugins.append(file["filename"].split("/")[0])
|
||||
delete = bool(main['commit']['message'].startswith("Delete:"))
|
||||
|
||||
with open("list.json", "r", encoding="utf8") as f:
|
||||
list_json = json.load(f)
|
||||
@ -20,6 +21,8 @@ for plugin in plugins:
|
||||
exist = True
|
||||
old_version = float(plug_dict["version"])
|
||||
list_json["list"][list_json["list"].index(plug_dict)]["version"] = str(old_version + 0.01)
|
||||
if delete:
|
||||
list_json["list"].remove(plug_dict)
|
||||
break
|
||||
if not exist:
|
||||
list_json["list"].append(
|
||||
|
Loading…
Reference in New Issue
Block a user