frs-cli
v6.2.1
Published
A git tool for Front-end Release System (FRS).
Downloads
18
Readme
一个为 Front-end Release System (FRS) 量身定做的 Git 命令行工具.
安装方式
$ npm i -g frs-cli
或者
$ cnpm i -g frs-cli
功能简介
分支管理
- 创建分支
$ frs create
- 删除分支
$ frs delete
- 切换分支
$ frs switch
- 查看分支
$ frs show
代码操作
- 同步代码
$ frs sync-latest
- 推送代码
$ frs push
提测操作
- 上传测试服务器
$ frs test
上线操作
- FRS 入库
$ frs release
- 同步 CDN 文件
$ frs publish
配置操作
- 配置参数
$ frs set
$ frs set-auth
使用文档
查看帮助
$ frs
或者
$ frs -h
创建分支
$ frs create
或者
$ frs cr
问题选项
语义化版本号生成规则
团队版本号格式规范:主版本号 . 次版本号 . 修订号 . 线上修复
填写分支描述
便于记录该分支的作用,建议填写
基于分支迁出
选择 checkout 操作的基础分支
删除分支
$ frs delete
或者
$ frs del
或者
$ frs dl
切换分支
$ frs switch
或者
$ frs sw
查看分支
$ frs show
同步代码
合并 主干分支(一般为 master
)最新代码
$ frs sync-latest
或者
$ frs sl
推送代码
推送 push
所有提交
$ frs push
提交测试
将 上线文件夹 内容拷贝至测试服务器
$ frs test
上线操作
上线操作有 2 步,对应有 2 个命令:
frs release
( 简写:frs rl
)相当于进行
git tag
操作,对应 FRS 入库记录,可在 FRS 上线系统 查看到对应记录frs publish
( 简写:frs pl
)相当于在 FRS 上线系统 中进行对应记录的上线确认,并同步 CDN 文件。
Tips:
publish
命令 基于当前已有标签进行操作,所以除了回滚操作以外,一般而言先 release
才能 publish
配置参数
例子:
设置 远程仓库名 值为 myOriginName
$ frs set --key=remote --val=myOriginName
key 可选值
remote (默认值: origin)
远程仓库别名
masterBranch (默认值: master)
主干分支名
devPrefix (默认值: daily)
开发分支前缀
tagPrefix (默认值: publish)
上线标签前缀
Warning: 若配合 FRS 系统使用,不应修改
tagPrefix
恢复默认
$ frs set --init
或者
$ frs set
* Git 操作输入
为了更简洁的信息输出,该工具把 shell
执行过程中的原生输出都抛弃了,换句话而言,原生命令行交互默认不开放,所以,如果:
您的
git push
操作等需要输入密码,需要开启原生命令行交互,即执行命令$ frs set-auth 1
若有使用问题或更好的建议,欢迎 联系我 !