From a196afc265fbb00997f7ddc892819cd13000aa7f Mon Sep 17 00:00:00 2001 From: Tim Linschoten Date: Thu, 6 Apr 2017 11:23:31 +0200 Subject: [PATCH] Added the LICENCE file and configured for first release --- LICENCE | 9 +++++++ build.sbt | 6 +---- project/SonatypePublish.scala | 48 +++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 LICENCE create mode 100644 project/SonatypePublish.scala diff --git a/LICENCE b/LICENCE new file mode 100644 index 00000000..ed76dbc2 --- /dev/null +++ b/LICENCE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2017 ING Bank NV + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/build.sbt b/build.sbt index 76fa6fd4..3ceb9129 100644 --- a/build.sbt +++ b/build.sbt @@ -28,11 +28,7 @@ lazy val noPublishSettings = Seq( publishArtifact := false ) -val artifactoryRealm = "Artifactory Realm" - -val publishSettings = Seq.empty - -lazy val defaultModuleSettings = commonSettings ++ Revolver.settings ++ publishSettings +lazy val defaultModuleSettings = commonSettings ++ Revolver.settings ++ SonatypePublish.settings lazy val baker = project.in(file("core")) .settings(defaultModuleSettings: _*) diff --git a/project/SonatypePublish.scala b/project/SonatypePublish.scala new file mode 100644 index 00000000..13352c5b --- /dev/null +++ b/project/SonatypePublish.scala @@ -0,0 +1,48 @@ +import sbt._ +import Keys._ +import sbtrelease.ReleasePlugin.autoImport._ +import sbtrelease.ReleaseStateTransformations._ + +object SonatypePublish { + + protected def isSnapshot(s: String) = s.trim endsWith "SNAPSHOT" + + protected val nexus = "https://oss.sonatype.org/" + protected val ossSnapshots = "Sonatype OSS Snapshots" at nexus + "content/repositories/snapshots/" + protected val ossStaging = "Sonatype OSS Staging" at nexus + "service/local/staging/deploy/maven2/" + + val settings = Seq( + licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT")), + homepage := Some(url("https://github.com/ing-bank/baker")), + pomExtra := ( + + git@github.com:ing-bank/baker.git + scm:git:git@github.com:ing-bank/baker + + + + Apollo + Squad Apollo + + + ), + publishMavenStyle := true, + publishTo <<= version((v: String) => Some(if (isSnapshot(v)) ossSnapshots else ossStaging)), + publishArtifact in Test := false, + pomIncludeRepository := (_ => false), + releaseProcess := Seq[ReleaseStep]( + checkSnapshotDependencies, + inquireVersions, + runClean, + runTest, + setReleaseVersion, + commitReleaseVersion, + tagRelease, + ReleaseStep(action = Command.process("publishSigned", _)), + setNextVersion, + commitNextVersion, + ReleaseStep(action = Command.process("sonatypeReleaseAll", _)), + pushChanges + ) + ) +} \ No newline at end of file