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

fix(api): export builtin gitTag and release #3254

Merged
merged 1 commit into from
Aug 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions sdk/exportentities/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,48 @@ func newSteps(a sdk.Action) []Step {
gitCloneArgs["tag"] = tag.Value
}
s["gitClone"] = gitCloneArgs
case sdk.GitTagAction:
gitTagArgs := map[string]string{}
path := sdk.ParameterFind(&act.Parameters, "path")
if path != nil {
gitTagArgs["path"] = path.Value
}
tagLevel := sdk.ParameterFind(&act.Parameters, "tagLevel")
if tagLevel != nil {
gitTagArgs["tagLevel"] = tagLevel.Value
}
tagMessage := sdk.ParameterFind(&act.Parameters, "tagMessage")
if tagMessage != nil {
gitTagArgs["tagMessage"] = tagMessage.Value
}
tagMetadata := sdk.ParameterFind(&act.Parameters, "tagMetadata")
if tagMetadata != nil && tagMetadata.Value != "" {
gitTagArgs["tagMetadata"] = tagMetadata.Value
}
tagPrerelease := sdk.ParameterFind(&act.Parameters, "tagPrerelease")
if tagPrerelease != nil && tagPrerelease.Value != "" {
gitTagArgs["tagPrerelease"] = tagPrerelease.Value
}
s["gitTag"] = gitTagArgs
case sdk.ReleaseAction:
releaseArgs := map[string]string{}
artifacts := sdk.ParameterFind(&act.Parameters, "artifacts")
if artifacts != nil {
releaseArgs["artifacts"] = artifacts.Value
}
releaseNote := sdk.ParameterFind(&act.Parameters, "releaseNote")
if releaseNote != nil {
releaseArgs["releaseNote"] = releaseNote.Value
}
tag := sdk.ParameterFind(&act.Parameters, "tag")
if tag != nil {
releaseArgs["tag"] = tag.Value
}
title := sdk.ParameterFind(&act.Parameters, "title")
if title != nil && title.Value != "" {
releaseArgs["title"] = title.Value
}
s["release"] = releaseArgs
case sdk.JUnitAction:
path := sdk.ParameterFind(&act.Parameters, "path")
if path != nil {
Expand Down