Skip to content

Commit b95a75e

Browse files
author
Charles O'Farrell
committed
Create bots directory from specific samples
1 parent c5ebdfd commit b95a75e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
-40.2 KB
Binary file not shown.

project/build.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,21 @@ object build extends Build {
113113
IO.copyFile(scalatronDir / fileToCopy, distDir / fileToCopy)
114114
}
115115

116-
for (dirToCopy <- List("webui", "doc/pdf", "bots")) {
116+
for (dirToCopy <- List("webui", "doc/pdf")) {
117117
println("Copying " + dirToCopy)
118118
IO.copyDirectory(scalatronDir / dirToCopy, distDir / dirToCopy)
119119
}
120120

121121
val distSamples = distDir / "samples"
122+
def sampleJar(sample: Project) = sample.base / ("target/scala-%s/ScalatronBot.jar" format version)
122123
for (sample <- samples) {
123-
val sampleJar = sample.base / ("target/scala-%s/ScalatronBot.jar" format version)
124-
if (sampleJar.exists) {
124+
if (sampleJar(sample).exists) {
125125
println("Copying " + sample.base)
126126
IO.copyDirectory(sample.base / "src", distSamples / sample.base.getName / "src")
127-
IO.copyFile(sampleJar, distSamples / sample.base.getName / "ScalatronBot.jar")
127+
IO.copyFile(sampleJar(sample), distSamples / sample.base.getName / "ScalatronBot.jar")
128128
}
129129
}
130+
IO.copyFile(sampleJar(referenceBot), distDir / "bots" / "Reference" / "ScalatronBot.jar")
130131

131132
for (file <- IO.listFiles(scalatronDir / "doc/tutorial") if !file.getName.endsWith(".md")) {
132133
IO.copyFile(file, distDir / "webui/tutorial" / file.getName)

0 commit comments

Comments
 (0)