Skip to content

Latest commit

 

History

History
455 lines (324 loc) · 10.8 KB

API.md

File metadata and controls

455 lines (324 loc) · 10.8 KB

Functions

checkGitDirEnv()

检查git环境变量

getConfig()Object

读取配置

getConfigFrom()Number

读取配置来源

debug()

debug

getConfig(pathName)Object

读取配置

getGitConfig()Object

获取git配置

getGitVersion()String

获取git版本

getGitRevParse()Object

获取git路径

writeFile()

写文件

mapTemplate()

获取模板数据

getSeconds()

传入字符串转换成时间(秒)

wait()

递归执行程序

queue(list)

脚本执行主程序

getCache()Array

获取未执行脚本列表

setCache()

存储未执行脚本列表

setLog()

存储错误日志

getStatusInfo()Boolean

获取分支状态

getStatus()Boolean

获取是否有未提交的文件

getGitLogs()Array

获取日志

checkBranch()Boolean

获取是否有某个分支

getCurrentBranch()String

获取当前分支

searchBranch()Array

获取当前分支

searchBranches()Array

获取当前分支

filterBranch()Array

搜索分支

getStashList()String

获取暂存区列表

getMessage()

解析模板数据

postMessage()

生成消息

sendMessage()

发送消息

getCommandMessage()

获取通用的指令提示信息

compareVersion(appName, compareVer, userAgent)Boolean | null

compareVersion版本号大小对比

getBranchesFromID()Array

获取包含commitID的分支

getGitUser()String

获取git用户名称

getGitEmail()String

获取git用户邮箱

getIsGitProject()String

获取当前是否git项目目录

readPkg()Object

读取配置

sendGroupMessage()

发送群消息

writeFile()

写文件

createArgs()

生成参数

encodeUnicode(str)String

中文转unioncode

decodeUnicode(str)String

中文转unioncode

checkGitDirEnv()

检查 git 环境变量

Kind: global function

getConfig() ⇒ Object

读取配置

Kind: global function
Returns: Object - arr 返回配置对象

getConfigFrom() ⇒ Number

读取配置来源

Kind: global function
Returns: Number - 返回来源 0,1,2

debug()

debug

Kind: global function

getConfig(pathName) ⇒ Object

读取配置

Kind: global function
Returns: Object - arr 返回配置对象

Param Type Description
pathName String 可传入目录或者文件,传入文件时,直接读取文件

getGitConfig() ⇒ Object

获取 git 配置

Kind: global function
Returns: Object - arr 返回对象

getGitVersion() ⇒ String

获取 git 版本

Kind: global function
Returns: String - str 返回版本号

getGitRevParse() ⇒ Object

获取 git 路径

Kind: global function
Returns: Object - arr 返回对象

writeFile()

写文件

Kind: global function

mapTemplate()

获取模板数据

Kind: global function

getSeconds()

传入字符串转换成时间(秒)

Kind: global function

wait()

递归执行程序

Kind: global function

queue(list)

脚本执行主程序

Kind: global function

Param Type Description
list Array 脚本序列

getCache() ⇒ Array

获取未执行脚本列表

Kind: global function
Returns: Array - arr 返回数组

setCache()

存储未执行脚本列表

Kind: global function

setLog()

存储错误日志

Kind: global function

getStatusInfo() ⇒ Boolean

获取分支状态

Kind: global function
Returns: Boolean - true 返回 true/false

getStatus() ⇒ Boolean

获取是否有未提交的文件

Kind: global function
Returns: Boolean - true 返回 true/false

getGitLogs() ⇒ Array

获取日志

Kind: global function
Returns: Array - true 返回列表

checkBranch() ⇒ Boolean

获取是否有某个分支

Kind: global function
Returns: Boolean - true 返回 true/false

getCurrentBranch() ⇒ String

获取当前分支

Kind: global function
Returns: String - 返回名称

searchBranch() ⇒ Array

获取当前分支

Kind: global function
Returns: Array - 返回列表数组

searchBranches() ⇒ Array

获取当前分支

Kind: global function
Returns: Array - 返回列表数组

filterBranch() ⇒ Array

搜索分支

Kind: global function
Returns: Array - 返回列表数组

getStashList() ⇒ String

获取暂存区列表

Kind: global function
Returns: String - 返回名称

getMessage()

解析模板数据

Kind: global function

postMessage()

生成消息

Kind: global function

sendMessage()

发送消息

Kind: global function

getCommandMessage()

获取通用的指令提示信息

Kind: global function

compareVersion(appName, compareVer, userAgent) ⇒ Boolean | null

compareVersion 版本号大小对比

Kind: global function
Returns: Boolean | null - null/true/false

Param Type Description
appName String app 名称
compareVer String 必传 需要对比的版本号
userAgent String ua,可不传,默认取 navigator.appVersion

getBranchesFromID() ⇒ Array

获取包含 commitID 的分支

Kind: global function
Returns: Array - 返回数组

getGitUser() ⇒ String

获取 git 用户名称

Kind: global function
Returns: String - 返回字符串

getGitEmail() ⇒ String

获取 git 用户邮箱

Kind: global function
Returns: String - 返回字符串

getIsGitProject() ⇒ String

获取当前是否 git 项目目录

Kind: global function
Returns: String - 返回字符串

readPkg() ⇒ Object

读取配置

Kind: global function
Returns: Object - arr 返回配置对象

sendGroupMessage()

发送群消息

Kind: global function

writeFile()

写文件

Kind: global function

createArgs()

生成参数

Kind: global function

encodeUnicode(str) ⇒ String

中文转 unioncode

Kind: global function
Returns: String - 返回字符串

Param Type Description
str string 字符串

decodeUnicode(str) ⇒ String

中文转 unioncode

Kind: global function
Returns: String - 返回字符串

Param Type Description
str string 字符串