Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gbb.json中variables[].value内容支持“命令表达式” #7

Closed
voidint opened this issue Dec 22, 2016 · 0 comments
Closed

gbb.json中variables[].value内容支持“命令表达式” #7

voidint opened this issue Dec 22, 2016 · 0 comments

Comments

@voidint
Copy link
Owner

voidint commented Dec 22, 2016

{
    "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}"
}

通过执行${}内的命令来获得最终的值。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant