Skip to content

Commit ba439a4

Browse files
committed
Clean up build system
1 parent 5496f1d commit ba439a4

4 files changed

Lines changed: 8 additions & 22 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ project/target/
1111
*.jar
1212
*.jar.pack.gz
1313
*.zip
14+
extensions

build.sbt

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,17 @@ packageOptions := Seq(
3030

3131
packageBin in Compile := {
3232
val jar = (packageBin in Compile).value
33-
val base = baseDirectory.value
33+
val target = baseDirectory.value / "extensions" / "ls"
3434
val s = streams.value
35-
IO.copyFile(jar, base / "ls.jar")
36-
Process("pack200 --modification-time=latest --effort=9 --strip-debug " +
37-
"--no-keep-file-order --unknown-attribute=strip " +
38-
"ls.jar.pack.gz ls.jar").!!
39-
if(Process("git diff --quiet --exit-code HEAD").! == 0) {
40-
Process("git archive -o ls.zip --prefix=ls/ HEAD").!!
41-
IO.createDirectory(base / "ls")
42-
IO.copyFile(base / "ls.jar", base / "ls" / "ls.jar")
43-
IO.copyFile(base / "ls.jar.pack.gz", base / "ls" / "ls.jar.pack.gz")
44-
Process("zip ls.zip ls/ls.jar ls/ls.jar.pack.gz").!!
45-
IO.delete(base / "ls")
46-
}
47-
else {
48-
s.log.warn("working tree not clean; no zip archive made")
49-
IO.delete(base / "ls.zip")
50-
}
35+
IO.createDirectory(target)
36+
IO.copyFile(jar, target / "ls.jar")
5137
val classpath = (dependencyClasspath in Runtime).value
5238
val libraryJarPaths =
5339
classpath.files.filter{path =>
5440
path.getName.endsWith(".jar") &&
5541
!path.getName.startsWith("scala-library")}
5642
for(path <- libraryJarPaths) {
57-
IO.copyFile(path, base / path.getName)
43+
IO.copyFile(path, target / path.getName)
5844
}
5945
jar
6046
}
@@ -65,7 +51,6 @@ test in Test := {
6551
}
6652

6753
cleanFiles <++= baseDirectory { base =>
68-
Seq(base / "ls.jar",
69-
base / "ls.jar.pack.gz",
70-
base / "ls.zip") }
54+
Seq(base / "extensions")
55+
}
7156

extensions/ls

Lines changed: 0 additions & 1 deletion
This file was deleted.

project/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version=0.13.7

0 commit comments

Comments
 (0)