mirror of https://github.com/sbt/sbt.git
Merge pull request #48 from ahjohannessen/dry-improvement
Removed duplicated code with regards to projectID generation.
This commit is contained in:
commit
a381c60485
|
|
@ -8,7 +8,7 @@ object Packaging {
|
||||||
val sbtLaunchJarUrl = SettingKey[String]("sbt-launch-jar-url")
|
val sbtLaunchJarUrl = SettingKey[String]("sbt-launch-jar-url")
|
||||||
val sbtLaunchJarLocation = SettingKey[File]("sbt-launch-jar-location")
|
val sbtLaunchJarLocation = SettingKey[File]("sbt-launch-jar-location")
|
||||||
val sbtLaunchJar = TaskKey[File]("sbt-launch-jar", "Resolves SBT launch jar")
|
val sbtLaunchJar = TaskKey[File]("sbt-launch-jar", "Resolves SBT launch jar")
|
||||||
|
val moduleID = (organization, sbtVersion) apply { (o,v) => ModuleID(o,"sbt",v) }
|
||||||
val stagingDirectory = SettingKey[File]("staging-directory")
|
val stagingDirectory = SettingKey[File]("staging-directory")
|
||||||
val stage = TaskKey[File]("stage")
|
val stage = TaskKey[File]("stage")
|
||||||
|
|
||||||
|
|
@ -95,10 +95,10 @@ object Packaging {
|
||||||
mappings in Universal <+= sbtLaunchJar map { _ -> "bin/sbt-launch.jar" },
|
mappings in Universal <+= sbtLaunchJar map { _ -> "bin/sbt-launch.jar" },
|
||||||
|
|
||||||
// Misccelaneous publishing stuff...
|
// Misccelaneous publishing stuff...
|
||||||
projectID in Debian <<= (organization, sbtVersion) apply { (o,v) => ModuleID(o,"sbt",v) },
|
projectID in Debian <<= moduleID,
|
||||||
projectID in Windows <<= (organization, sbtVersion) apply { (o,v) => ModuleID(o,"sbt",v) },
|
projectID in Windows <<= moduleID,
|
||||||
projectID in Rpm <<= (organization, sbtVersion) apply { (o,v) => ModuleID(o,"sbt",v) },
|
projectID in Rpm <<= moduleID,
|
||||||
projectID in Universal <<= (organization, sbtVersion) apply { (o,v) => ModuleID(o,"sbt",v) },
|
projectID in Universal <<= moduleID,
|
||||||
stagingDirectory <<= (target) apply { (t) => t / "stage" },
|
stagingDirectory <<= (target) apply { (t) => t / "stage" },
|
||||||
stage <<= (stagingDirectory, mappings in Universal) map { (dir, m) =>
|
stage <<= (stagingDirectory, mappings in Universal) map { (dir, m) =>
|
||||||
val files = for((file, name) <- m)
|
val files = for((file, name) <- m)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue