From 343fbb6e56e4f04b017823ce542b1f6ba309f396 Mon Sep 17 00:00:00 2001 From: Cory Bennett Date: Thu, 19 Feb 2015 13:07:46 -0800 Subject: [PATCH] add --template option to export-templates to export a single template --- jira/cli/commands.go | 3 +++ jira/main.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jira/cli/commands.go b/jira/cli/commands.go index c5889901..420a5951 100644 --- a/jira/cli/commands.go +++ b/jira/cli/commands.go @@ -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) diff --git a/jira/main.go b/jira/main.go index 0ff0d51d..a9710fce 100644 --- a/jira/main.go +++ b/jira/main.go @@ -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