-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX #217 Introduced executableScriptName setting
- Loading branch information
Showing
37 changed files
with
241 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import NativePackagerKeys._ | ||
|
||
packagerSettings | ||
|
||
packageArchetype.java_server | ||
|
||
name := "debian-test" | ||
|
||
executableScriptName := "debian-exec" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "Josh Suereth <joshua.suereth@typesafe.com>" | ||
|
||
packageSummary := "Test debian package" | ||
|
||
packageDescription := """A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
debianPackageDependencies in Debian ++= Seq("java2-runtime", "bash (>= 2.05a-11)") | ||
|
||
debianPackageRecommends in Debian += "git" | ||
|
||
TaskKey[Unit]("check-upstart-script") <<= (target, streams) map { (target, out) => | ||
val script = IO.read(target / "debian-test-0.1.0" / "etc" / "init" / "debian-test.conf") | ||
assert(script.contains("exec ./bin/debian-exec"), "wrong exec call\n" + script) | ||
out.log.success("Successfully tested control script") | ||
() | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/debian/test-executableScriptName/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
10 changes: 10 additions & 0 deletions
10
src/sbt-test/debian/test-executableScriptName/src/main/scala/test/Main.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package test | ||
|
||
object Main { | ||
def main (args: Array[String]) { | ||
//server app imitation | ||
while (true){ | ||
Thread.sleep(1000L) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Run the debian packaging. | ||
> debian:package-bin | ||
$ exists target/debian-test_0.1.0_all.deb | ||
# Testing the packageName configuration | ||
$ exists target/debian-test-0.1.0/DEBIAN | ||
$ exists target/debian-test-0.1.0/DEBIAN/control | ||
# -------------------------------------------- | ||
$ exists target/debian-test-0.1.0/usr/ | ||
$ exists target/debian-test-0.1.0/usr/share/ | ||
$ exists target/debian-test-0.1.0/usr/share/debian-test/ | ||
$ exists target/debian-test-0.1.0/usr/share/debian-test/bin/ | ||
$ exists target/debian-test-0.1.0/usr/share/debian-test/bin/debian-exec | ||
$ exists target/debian-test-0.1.0/var/log/debian-test/ | ||
$ exists target/debian-test-0.1.0/var/run/debian-test/ | ||
$ exists target/debian-test-0.1.0/etc/default/debian-test/ | ||
# -------------------------------------------- | ||
$ exists target/debian-test-0.1.0/etc/init/debian-test.conf | ||
> check-upstart-script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import com.typesafe.sbt.SbtNativePackager._ | ||
import NativePackagerKeys._ | ||
|
||
packageArchetype.java_application | ||
|
||
name := "docker-test" | ||
|
||
packageName in Docker := "docker-package" | ||
|
||
executableScriptName := "docker-exec" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "Gary Coady <gary@lyranthe.org>" | ||
|
||
TaskKey[Unit]("check-dockerfile") <<= (target, streams) map { (target, out) => | ||
val dockerfile = IO.read(target / "docker" / "Dockerfile") | ||
assert(dockerfile.contains("ENTRYPOINT [\"bin/docker-exec\"]\n"), "dockerfile doesn't contain ENTRYPOINT [\"docker-exec\"]\n" + dockerfile) | ||
out.log.success("Successfully tested control script") | ||
() | ||
} |
1 change: 1 addition & 0 deletions
1
src/sbt-test/docker/test-executableScriptName/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
Oops, something went wrong.