ctrip-upload-gits
v1.0.9
Published
git自动化上传
Downloads
24
Readme
ctrip-upload-gits
安装教程
npm install ctrip-upload-gits
使用教程
import argvResult from 'ctrip-upload-gits'
const autoUpload = new AutoUpload({
baseDir: '../xxx',
gitRemote: 'https://gitee.com/xx/xxx.git',
defaultProps: {
task: '0', //任务号
commit: '[feat] Automatic submission of upload-gits', //commit描述
branch: 'master', //分支
remote: 'origin', //远程仓库
},
})
autoUpload.gitPull() //拉取代码
autoUpload.gitPush() //推送代码
| 参数 | 是否必传 | 描述 | 默认值 | | :----------- | :------- | :--------------- | :------------------------------------------------------------------------------------------- | | baseDir | 否 | 项目地址 | 当前项目 | | gitRemote | 否 | 项目远程仓库地址 | 当前项目远程仓库地址 | | defaultProps | 否 | 项目远程仓库地址 | { commit: '[feat] Automatic submission of upload-gits', branch: 'master', remote: 'origin' } |