Skip to main content

多分支 worktree 管理工具

Project description

yyp

多分支 worktree 管理工具(支持 krepo-nggit)。

安装

pip install yyp

使用

  • 创建 worktree:
yyp add <path> <branch>

这会在 ~/<path>/wpsmain~/<path>/wpsweb 下分别创建或切换到 <branch>

  • 列出 worktree:
yyp list
  • 移除 worktree:
yyp remove <path>

这会移除 ~/<path>/wpsmain~/<path>/wpsweb 的 worktree,并删除整个 <path> 目录。

  • 配置管理:
yyp set work_dir=~/workspace  # 设置工作目录
yyp config                    # 显示当前配置
  • 修改配置和生成构建脚本(仅限 Linux):
yyp modify                    # 修改 wpsweb/server/Makefile 和生成 build_server.sh
yyp modify --force            # 强制在非 Linux 系统上运行(不推荐)

这会自动查找 wpsweb 目录,并执行以下操作:

  1. 修改 server/Makefile
    • 去掉 -Wl,-s 参数
    • -O2 修改为 -g
  2. 生成 build_server.sh
    • 清空文件内容并写入构建脚本
    • 动态替换路径变量(基于当前执行路径)
    • 自动设置执行权限

注意: modify 命令仅在 Linux 系统上支持,因为它需要修改 Makefile 和生成 shell 脚本。

  • 自动编译 wpsmain:
yyp build                     # 自动编译 wpsmain

这会自动查找 wpsmain 目录,并在 Docker 中执行以下操作:

  1. 配置 weboffice:执行 krepo-ng config --new -x weboffice
  2. 检查目录:验证 debug_weboffice 目录是否创建成功
  3. 编译项目:在 debug_weboffice 目录中执行 krepo-ng build
  4. 执行构建脚本:查找并执行 wpsweb/build_server.sh 脚本

注意: build 命令需要在 Docker 环境中执行,使用 kdocker -r qt5 命令。

依赖

  • 需要本机已安装并在 PATH 中可用:krepo-nggit
  • 配置文件位置:~/.yyp.json

许可

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yyp-0.2.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yyp-0.2.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file yyp-0.2.2.tar.gz.

File metadata

  • Download URL: yyp-0.2.2.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for yyp-0.2.2.tar.gz
Algorithm Hash digest
SHA256 cb9494fd4ebf7b601439ee582386d3302fd3d77854ed01b373862f5c29ea0ac4
MD5 b19c67b3ccc19322ae7a9d4d3eaec256
BLAKE2b-256 d7f80e194481a43ddac46d1e5e1c5f4cbf78a69a1eb3845c7184aeeb4f3cf91d

See more details on using hashes here.

File details

Details for the file yyp-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: yyp-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for yyp-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 969fbc5e7b4d740fcd9c50abeada1b66e507d03bd73832a25d39055b73ef7a3b
MD5 c009bfa52e9642b7a2ad650dd98e4b47
BLAKE2b-256 36b34ab5ba4c4214bc38ca27728c500f54632f63cd12090cdfa9f0a851210673

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page