annotate scripts/antall.groovy @ 361:7b6d30651db7

Cygwin has an ENV that container 'CI'. Causing build issues. Just check for 'github' to determine if it is a local build
author davis@ssdt-ohio.org
date Thu, 16 Nov 2023 15:52:40 -0500
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 }