From 5dcc8b8fe37c5b3dc749780ae2e28c9c5ab08d2d Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sat, 9 Jul 2011 17:17:41 -0400 Subject: [PATCH] disable full-release settings when release configuration not present --- project/Release.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/project/Release.scala b/project/Release.scala index ab60743e0..2810d788c 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -26,7 +26,8 @@ object Release extends Build lazy val wikiRemoteRepo = SettingKey[String]("wiki-remote-repo") 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( publishTo in ThisBuild <<= publishResolver, @@ -36,7 +37,9 @@ object Release extends Build publishAllArtifacts <<= Util.inAll(nonRoots, publish.task), publishLauncher <<= deployLauncher(launcher), 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, copyAPIDoc <<= copyAPIDoc0, pushWiki <<= pushWiki0, @@ -46,7 +49,7 @@ object Release extends Build sbtRemoteRepo := "git@github.com:harrah/xsbt.git", wikiRemoteRepo := "git@github.com:harrah/xsbt.wiki.git", updatedPagesRepository <<= updatedRepo(pagesRepository, sbtRemoteRepo, Some("gh-pages")), - updatedWikiRepository <<= updatedRepo(wikiRepository, wikiRemoteRepo, None) + updatedWikiRepository <<= updatedRepo(wikiRepository, wikiRemoteRepo, None) ) def deployLauncher(launcher: ScopedTask[File]) = (launcher, launcherRemotePath, credentials, remoteBase, streams) map { (launchJar, remotePath, creds, base, s) =>