Skip to content

Commit

Permalink
Merge pull request #298 from sbt/fix/issue-292
Browse files Browse the repository at this point in the history
Fixes #292 - Not feeding new isSnapshot value to ivy configuration.
  • Loading branch information
muuki88 committed Jul 18, 2014
2 parents 66273a3 + 1f46265 commit 37d0f44
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/scala/com/typesafe/sbt/packager/SettingsHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@ object SettingsHelper {
ivyModule <<= (ivySbt, moduleSettings) map { (i, s) => new i.Module(s) },
deliverLocalConfiguration <<= (crossTarget, ivyLoggingLevel) map { (outDir, level) => Classpaths.deliverConfig(outDir, logging = level) },
deliverConfiguration <<= deliverLocalConfiguration,
publishConfiguration <<= (packagedArtifacts, checksums, publishTo) map { (as, checks, publishTo) =>
publishConfiguration <<= (packagedArtifacts, checksums, publishTo, isSnapshot) map { (as, checks, publishTo, isSnap) =>
new PublishConfiguration(ivyFile = None,
resolverName = Classpaths.getPublishTo(publishTo).name,
artifacts = as,
checksums = checks,
logging = UpdateLogging.DownloadOnly)
logging = UpdateLogging.DownloadOnly,
overwrite = isSnap)
},
publishLocalConfiguration <<= (packagedArtifacts, checksums) map { (as, checks) =>
publishLocalConfiguration <<= (packagedArtifacts, checksums, isSnapshot) map { (as, checks, isSnap) =>
new PublishConfiguration(ivyFile = None,
resolverName = "local",
artifacts = as,
checksums = checks,
logging = UpdateLogging.DownloadOnly)
logging = UpdateLogging.DownloadOnly,
overwrite = isSnap)
})) ++ addPackage(config, packageTask, extension)
}
14 changes: 14 additions & 0 deletions src/sbt-test/universal/publish/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import NativePackagerKeys._

packagerSettings

deploymentSettings

name := "simple-test"

version := "0.1.0"

// Workarund for ivy configuration bug
resolvers += (publishTo in Universal).value.get

publishTo in Universal := Some(Resolver.file("test", file("test-repo"))(Patterns("[module]/[revision]/[module]-[revision].[ext]")))
1 change: 1 addition & 0 deletions src/sbt-test/universal/publish/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version"))
1 change: 1 addition & 0 deletions src/sbt-test/universal/publish/src/universal/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DUMMY!
4 changes: 4 additions & 0 deletions src/sbt-test/universal/publish/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ensure we can publish to local file system.
> universal:publish
# Ensure isSnpashot works correctly
> universal:publish

0 comments on commit 37d0f44

Please sign in to comment.