Updated CLI to 1.1.4
This commit is contained in:
parent
72ee16ef57
commit
5303467175
@ -1,8 +1,8 @@
|
|||||||
#Mon Feb 22 08:26:47 CST 2010
|
#Mon Feb 22 10:14:38 CST 2010
|
||||||
build.dir=build
|
build.dir=build
|
||||||
src.dir=src
|
src.dir=src
|
||||||
build.jar=pit-cli-${application.version}.${build.number}.jar
|
build.jar=pit-cli-${application.version}.${build.number}.jar
|
||||||
build.number=2
|
build.number=11
|
||||||
expected.application.version=1.1.4
|
expected.application.version=1.1.4
|
||||||
lib.dir=lib
|
lib.dir=lib
|
||||||
release.dir=release
|
release.dir=release
|
||||||
|
BIN
pit-cli/release/pit-cli-1.1.4.jar
Normal file
BIN
pit-cli/release/pit-cli-1.1.4.jar
Normal file
Binary file not shown.
@ -39,6 +39,8 @@ def categories = ['bug','feature','task']
|
|||||||
if (opts.c) categories = opts.c.split(/[,\s]/)
|
if (opts.c) categories = opts.c.split(/[,\s]/)
|
||||||
categories = categories.collect { Category.toCategory(it) }
|
categories = categories.collect { Category.toCategory(it) }
|
||||||
|
|
||||||
|
def EOL = System.getProperty('line.separator')
|
||||||
|
|
||||||
// build issue list
|
// build issue list
|
||||||
issuedb = new FileProject(new File('.'))
|
issuedb = new FileProject(new File('.'))
|
||||||
|
|
||||||
@ -51,7 +53,8 @@ def filter = new Filter('categories': categories,
|
|||||||
|
|
||||||
// list first
|
// list first
|
||||||
if (opts.l) {
|
if (opts.l) {
|
||||||
def issuePrinter = { issue, offset ->
|
|
||||||
|
def printIssue = { issue, offset ->
|
||||||
println "${offset}${issue}"
|
println "${offset}${issue}"
|
||||||
if (opts.v) {
|
if (opts.v) {
|
||||||
println ""
|
println ""
|
||||||
@ -60,17 +63,15 @@ if (opts.l) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def projectPrinter
|
def printProject
|
||||||
projectPrinter = { project, offset ->
|
printProject = { project, offset ->
|
||||||
println "\n${offset}${project.name}"
|
println "\n${offset}${project.name}"
|
||||||
println "${offset}${'-'.multiply(project.name.length())}"
|
println "${offset}${'-'.multiply(project.name.length())}"
|
||||||
project.eachIssue(filter) { issuePrinter.call(it, offset) }
|
project.eachIssue(filter) { printIssue(it, offset) }
|
||||||
project.eachProject(filter) { projectPrinter.call(it, offset + " ") }
|
project.eachProject(filter) { printProject(it, offset + " ") }
|
||||||
}
|
}
|
||||||
|
issuedb.eachIssue(filter) { printIssue(it, "") }
|
||||||
issuedb.eachIssue { issuePrinter.call(it, "") }
|
issuedb.eachProject(filter) { printProject(it, "") }
|
||||||
issuedb.eachProject(filter) { projectPrinter.call(it, "") }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// change priority second
|
// change priority second
|
||||||
@ -87,7 +88,7 @@ else if (opts.C) {
|
|||||||
try { cat = Category.toCategory(opts.C) }
|
try { cat = Category.toCategory(opts.C) }
|
||||||
catch (e) { println "Invalid category: ${opts.C}"; return 1 }
|
catch (e) { println "Invalid category: ${opts.C}"; return 1 }
|
||||||
|
|
||||||
walkProject(issued, filterb) { it.category = cat }
|
walkProject(issuedb, filterb) { it.category = cat }
|
||||||
}
|
}
|
||||||
// new entry last
|
// new entry last
|
||||||
else if (opts.n) {
|
else if (opts.n) {
|
||||||
@ -119,17 +120,14 @@ else if (opts.n) {
|
|||||||
println "Enter issue (use EOF of ^D to end): "
|
println "Enter issue (use EOF of ^D to end): "
|
||||||
try {
|
try {
|
||||||
sin.eachLine { line ->
|
sin.eachLine { line ->
|
||||||
println ">>${line}"
|
|
||||||
def m = line =~ /(.*)EOF.*/
|
def m = line =~ /(.*)EOF.*/
|
||||||
if (m) {
|
if (m) {
|
||||||
text += m[0][1]
|
text += m[0][1] + EOL
|
||||||
sin.close()
|
sin.close()
|
||||||
} else text += line
|
} else text += line + EOL
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
println text
|
|
||||||
println "------------------------"
|
|
||||||
|
|
||||||
issue = issuedb.createNewIssue(category: cat, priority: priority, text: text)
|
issue = issuedb.createNewIssue(category: cat, priority: priority, text: text)
|
||||||
|
|
||||||
@ -141,3 +139,6 @@ def walkProject(Project p, Filter filter, Closure c) {
|
|||||||
p.eachIssue(filter, c)
|
p.eachIssue(filter, c)
|
||||||
p.eachProject(filter) { walkProject(it, filter, c) }
|
p.eachProject(filter) { walkProject(it, filter, c) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def printProject(Project project, String offset, Filter filter, boolean verbose = false) {
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user