Files
GenshinUID/deploy/update_pyproject.py
MingxuanGame 806e2f4b29 🚀 support deploying by docker
docker build -t genshinuid:v3.1.0 .

nonebot 在 /nb2/nb2,GenshinUID 在 /plugin,需要的可自行挂载(用 docker volume)

默认不带有 go-cqhttp 及 nonebot-plugin-gocqhttp 插件,暴露端口 8080,需要自己连接 go-cqhttp

build 前修改 deploy 文件夹下的 .env.dev 修改镜像的 nonebot2 配置,或者可以运行后挂载 nb2 目录修改
2022-10-04 00:16:12 +08:00

22 lines
504 B
Python

from typing import List
import tomlkit
def main():
with open("./nb2/pyproject.toml", "r", encoding="utf-8") as f:
data = tomlkit.load(f)
plugins: List[str] = data["tool"]["nonebot"]["plugins"] # type: ignore
if "GenshinUID" in plugins:
return
plugins.append("GenshinUID")
with open("./nb2/pyproject.toml", "w", encoding="utf-8") as f:
tomlkit.dump(data, f)
print("Update pyproject.toml done.")
if __name__ == "__main__":
main()