多分支 worktree 管理工具
Project description
ypp
多分支 worktree 管理工具(支持 krepo-ng 与 git)。
安装
pip install ypp
使用
- 创建 worktree:
ypp add <path> <branch>
这会在 ~/<path>/wpsmain 和 ~/<path>/wpsweb 下分别创建或切换到 <branch>。
- 列出 worktree:
ypp list
- 移除 worktree:
ypp remove <path>
这会移除 ~/<path>/wpsmain 和 ~/<path>/wpsweb 的 worktree,并删除整个 <path> 目录。
- 配置管理:
ypp set work_dir=~/workspace # 设置工作目录
ypp config # 显示当前配置
- 修改配置和生成构建脚本(仅限 Linux):
ypp modify # 修改 wpsweb/server/Makefile 和生成 build_server.sh
ypp modify --force # 强制在非 Linux 系统上运行(不推荐)
这会自动查找 wpsweb 目录,并执行以下操作:
- 修改
server/Makefile:- 去掉
-Wl,-s参数 - 将
-O2修改为-g
- 去掉
- 生成
build_server.sh:- 清空文件内容并写入构建脚本
- 动态替换路径变量(基于当前执行路径)
- 自动设置执行权限
注意:
modify命令仅在 Linux 系统上支持,因为它需要修改 Makefile 和生成 shell 脚本。
- 初始化仓库:
ypp init wpsmain # 初始化 wpsmain 仓库
ypp init wpsweb # 初始化 wpsweb 仓库
ypp init # 依次初始化 wpsmain 和 wpsweb 仓库
这会执行以下操作:
- wpsmain 初始化:在当前目录执行
krepo-ng init -b master_kso_v12 --bundle all - wpsweb 初始化:在当前目录执行
git clone git@ksogit.kingsoft.net:wow/wpsweb.git
- 自动编译 wpsmain:
ypp build # 自动编译 wpsmain
这会自动查找 wpsmain 目录,并在 Docker 中执行以下操作:
- 配置 weboffice:执行
krepo-ng config --new -x weboffice - 检查目录:验证
debug_weboffice目录是否创建成功 - 编译项目:在
debug_weboffice目录中执行krepo-ng build - 执行构建脚本:查找并执行
wpsweb/build_server.sh脚本
注意:
build命令需要在 Docker 环境中执行,使用kdocker -r qt5命令。
依赖
- 需要本机已安装并在 PATH 中可用:
krepo-ng、git。 - 配置文件位置:
~/.ypp.json
许可
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ypp-0.3.2.tar.gz.
File metadata
- Download URL: ypp-0.3.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67f574d66df5da82efb1f5bab44e3808ce0f56e5a29b02c289820dc80057891b
|
|
| MD5 |
7fa87a5eae568453966a8eeef8df014e
|
|
| BLAKE2b-256 |
b962b3fabfdd750da864a8722099edd21875cdffd493b31dff7ebba47427d11a
|
File details
Details for the file ypp-0.3.2-py3-none-any.whl.
File metadata
- Download URL: ypp-0.3.2-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c6ca3ed3f8108a2bf8c17f736e5d88abac238f6d71f54de521b4b72ae15f04a
|
|
| MD5 |
58471415758f0438feaeb4c14d2156eb
|
|
| BLAKE2b-256 |
4c7a8ad7c2a992b0a11a09b70e5321fa053fa00eebc853a5bfc878b27b24e477
|