玩 2.5
在 SBT-release https://github.com/sbt/sbt-release中运行发布任务时,有没有办法自动加载测试配置。
目前,我必须运行此命令并明确指定测试配置文件。
sbt "release with-defaults" -Dconfig.resource=application-test.conf
runTest步骤是发布步骤 之一 build.sbt是否可以让它自动获取测试配置?
releaseProcess <<= thisProjectRef apply { ref =>
import sbtrelease.ReleaseStateTransformations._
Seq[ReleaseStep](
loginToAwsEcr(ref),
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepTask(sbtdocker.DockerKeys.dockerBuildAndPush),
uploadBeanstalkBundle(ref),
setNextVersion,
commitNextVersion,
pushChanges
)
}
项目/plugins.sbt
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.4.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0-M9")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.4")
我试图添加
javaOptions in Test += "-Dconfig.file=conf/application-test.conf"
但它不起作用。