UpgradeAll 服务端代码仓库
该项目旨在为 UpgradeAll 项目 提供数据支持。 它由以下部分构成
- 服务端主体。
- 软件源脚本仓库。
UpgradeAll 服务端
最开始因为 @yah 在维护脚本时发觉本地爬虫的效率问题而被提出,并于 0.1.2 版本(客户端版本)的开发阶段实现。
这个项目使用 Python 3。请确保你本地安装了它们。
TIPS:gRPC proto 编译命令(在 server 目录下执行):
python -m grpc_tools.protoc -I./ --python_out=. --grpc_python_out=. ./app/grpc_template/route.proto
克隆仓库,这样你就可以开始使用该项目了
$ git clone --depth=1 https://github.com/DUpdateSystem/Server.git
# 获取你的调试/开发的基础环境
$ cd server
# 进入 Server 主体代码文件夹
$ podman pull docker.io/xiangzhedev/upgradeall-server
# 更新镜像
$ podman run --rm -p 5255:5255 xiangzhedev/upgradeall-server
# 单次运行
$ podman run --rm -v $PWD/app:/app -p 5255:5255 xiangzhedev/upgradeall-server
# 测试运行(在该项目的根目录下运行)
$ podman run --rm -p 5255:5255 xiangzhedev/upgradeall-server --help
# 查看参数帮助
$ podman run -dit --restart unless-stopped --name=update-server -d -p 5255:5255 xiangzhedev/upgradeall-server
# 服务部署
$ podman stop update-server && podman container rm update-server
# 停止服务
$ ./startup.sh --help
# 查看使用帮助
# 使用 debug 模式运行时,将直接挂载 app 文件夹到相关目录下,因此,在修改本项目代码时,请尽管测试你的代码。
因为我没有 Windows 开发环境,所以我只以 Linux 作为示例,命令可能不完全相同
$ pip3 install -r app/requirements.txt
# 安装 Python 依赖
$ python3 -m app --help
# 查看命令帮助
$ podman run -dit --restart unless-stopped --name=update-server -d -p 5255:5255 xiangzhedev/upgradeall-server
# 服务部署
$ podman run --rm xiangzhedev/upgradeall-server --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源
不推荐使用 该脚本只用于调试,脚本会自动本地编译新的 Docker 镜像并挂载代码文件夹以便调试
$ ./startup.sh
# 部署服务端
$ ./startup.sh --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源
$ python3 -m app
# 部署服务端
$ python3 -m app --debug 6a6d590b-1809-41bf-8ce3-7e3f6c8da945 --test_options android_app_package com.nextcloud.client
# 测试软件源
usage: DUpdateSystem Server [-h] [--normal] [--debug] [--init_account] [--test_options [TEST_OPTIONS ...]] [hub_uuid]
DUpdateSystem 服务端
positional arguments:
hub_uuid 测试的软件源脚本的 UUID
optional arguments:
-h, --help show this help message and exit
--normal 以 config.ini 配置正常运行服务端
--debug 运行软件源脚本测试
--init_account 测试的软件源脚本的帐号初始化函数
--test_options [TEST_OPTIONS ...]
测试软件源脚本的运行选项,以 key value 为组,例如:android_app_package net.xzos.upgradeall
- UpgradeAll — UpgradeAll 的安卓实现。
- UpgradeAll-rules — UpgradeAll 的配置文件仓库。
非常欢迎你的加入!官方文档-参与我们
你已经有一个明确的想法了?请 提一个 Issue 或者提交一个 Pull Request。
GPL-3.0 © xz-dev