mirror of https://github.com/sbt/sbt.git
disable full-release settings when release configuration not present
This commit is contained in:
parent
aae610e568
commit
5dcc8b8fe3
|
|
@ -26,7 +26,8 @@ object Release extends Build
|
||||||
lazy val wikiRemoteRepo = SettingKey[String]("wiki-remote-repo")
|
lazy val wikiRemoteRepo = SettingKey[String]("wiki-remote-repo")
|
||||||
|
|
||||||
def settings(nonRoots: => Seq[ProjectReference], launcher: ScopedTask[File]): Seq[Setting[_]] =
|
def settings(nonRoots: => Seq[ProjectReference], launcher: ScopedTask[File]): Seq[Setting[_]] =
|
||||||
if(CredentialsFile.exists) releaseSettings(nonRoots, launcher) else Nil
|
(if(CredentialsFile.exists) releaseSettings(nonRoots, launcher) else Nil) ++
|
||||||
|
(if(file(".release.sbt") exists) fullReleaseSettings else Nil)
|
||||||
|
|
||||||
def releaseSettings(nonRoots: => Seq[ProjectReference], launcher: ScopedTask[File]): Seq[Setting[_]] = Seq(
|
def releaseSettings(nonRoots: => Seq[ProjectReference], launcher: ScopedTask[File]): Seq[Setting[_]] = Seq(
|
||||||
publishTo in ThisBuild <<= publishResolver,
|
publishTo in ThisBuild <<= publishResolver,
|
||||||
|
|
@ -36,7 +37,9 @@ object Release extends Build
|
||||||
publishAllArtifacts <<= Util.inAll(nonRoots, publish.task),
|
publishAllArtifacts <<= Util.inAll(nonRoots, publish.task),
|
||||||
publishLauncher <<= deployLauncher(launcher),
|
publishLauncher <<= deployLauncher(launcher),
|
||||||
publishRelease <<= Seq(publishLauncher, publishAllArtifacts).dependOn,
|
publishRelease <<= Seq(publishLauncher, publishAllArtifacts).dependOn,
|
||||||
launcherRemotePath <<= (organization, version) { (org, v) => List(org, LaunchJarName, v, LaunchJarName + ".jar").mkString("/") },
|
launcherRemotePath <<= (organization, version) { (org, v) => List(org, LaunchJarName, v, LaunchJarName + ".jar").mkString("/") }
|
||||||
|
)
|
||||||
|
def fullReleaseSettings: Seq[Setting[_]] = Seq(
|
||||||
pushAPIDoc <<= pushAPIDoc0,
|
pushAPIDoc <<= pushAPIDoc0,
|
||||||
copyAPIDoc <<= copyAPIDoc0,
|
copyAPIDoc <<= copyAPIDoc0,
|
||||||
pushWiki <<= pushWiki0,
|
pushWiki <<= pushWiki0,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue