annotate scripts/antall.groovy @ 355:b2b512824e8f

revert changes
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 05 Sep 2023 14:04:02 -0400
parents f351338a3b3a
children
rev   line source
93
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
1
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
2 def targets = 'clean default'
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
3 if (args) {
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
4 targets = args.join(' ')
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
5 }
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
6
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
7 new File('.').traverse([type: groovy.io.FileType.DIRECTORIES, maxDepth:2]) { project ->
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
8 def script = new File(project,'build.xml')
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
9 if (script.exists() ) {
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
10
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
11 def out = new StringBuffer()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
12 def err = new StringBuffer()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
13 println "-" * 50
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
14 println "processing: $script ($targets)"
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
15 def proc = "cmd /C ant $targets".execute(null,project)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
16 proc.consumeProcessOutput(out,out)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
17 proc.waitForOrKill(480 * 1000)
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
18 new File(project,"build.log").text = out.toString()
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
19 println out
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
20 }
f351338a3b3a adding useful scripts
smith@nwoca.org
parents:
diff changeset
21 }