Skip to content

Commit

Permalink
add --template option to export-templates to export a single template
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Feb 19, 2015
1 parent 63a1fd9 commit 343fbb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions jira/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ func (c *Cli) CmdExportTemplates() error {
}

for name, template := range all_templates {
if wanted, ok := c.opts["template"]; ok && wanted != name {
continue
}
templateFile := fmt.Sprintf("%s/%s", dir, name)
if _, err := os.Stat(templateFile); err == nil {
log.Warning("Skipping %s, already exists", templateFile)
Expand Down
2 changes: 1 addition & 1 deletion jira/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Usage:
jira [-v ...] [-u USER] [-e URI] [-t FILE] issuetypes [-p PROJECT]
jira [-v ...] [-u USER] [-e URI] [-t FILE] createmeta [-p PROJECT] [-i ISSUETYPE]
jira [-v ...] [-u USER] [-e URI] [-b] [-t FILE] transitions ISSUE
jira [-v ...] export-templates [-d DIR]
jira [-v ...] export-templates [-d DIR] [-t template]
jira [-v ...] [-u USER] [-e URI] (b|browse) ISSUE
jira [-v ...] [-u USER] [-e URI] [-t FILE] login
jira [-v ...] [-u USER] [-e URI] [-b] [-t FILE] ISSUE
Expand Down

0 comments on commit 343fbb6

Please sign in to comment.