$ npm install gotag -g
$ npm install gotag -S
"disTag": {
"type": "git",
"repo": "https://github.com/huarxia/blog.git",
"dir": "static",
"user": "huarxia", // 选填
"email": "huaxia@huar.love" // 选填
}
必须新建一个分支,分支名起为 disTag
中配置的 dir
的value
值
-
type
非必填
只是标明是git类型 -
repo
必填
远程git仓库 -
dir
非必填
需要打tag的目录 建议填写,因为该工具就是解决特殊打tag问题,不填写会默认将当前所有文件进行tag
gotag -t xxx -m xxx
其中:
-t xxx
中xxx
代表tag
名称-m xxx
中xxx
代表tag
注释
-t -m 是必须参数
// package.json
"scripts": {
"tag": "gotag"
}
当前项目根路径中
$ npm run tag -- -t xxx -m xxx