gbb.json中variables[].value内容支持“命令表达式”
voidint opened this issue · 0 comments
voidint commented
{
"version": "0.0.1",
"tool": "go install",
"package": "main",
"variables": [
{
"variable": "Date",
"value": "{{.date}}"
},
{
"variable": "Commit",
"value": "{{.gitCommit}}"
}
]
}
如上,{{.date}}
、{{.gitCommit}}
都是内建表达式,这些表达式的逻辑是内建的,或者说逻辑都是硬编码的。应该支持通过执行命令来获得结果,比如👇
{
"variable": "Commit",
"value": "${git rev-parse HEAD}"
}
通过执行${}
内的命令来获得最终的值。