Skip to content

Commit a196afc

Browse files
committedApr 6, 2017
Added the LICENCE file and configured for first release
·
v5.0.0V3.5.0
1 parent 220e392 commit a196afc

File tree

3 files changed

+58
-5
lines changed

3 files changed

+58
-5
lines changed
 

‎LICENCE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 ING Bank NV
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

‎build.sbt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ lazy val noPublishSettings = Seq(
2828
publishArtifact := false
2929
)
3030

31-
val artifactoryRealm = "Artifactory Realm"
32-
33-
val publishSettings = Seq.empty
34-
35-
lazy val defaultModuleSettings = commonSettings ++ Revolver.settings ++ publishSettings
31+
lazy val defaultModuleSettings = commonSettings ++ Revolver.settings ++ SonatypePublish.settings
3632

3733
lazy val baker = project.in(file("core"))
3834
.settings(defaultModuleSettings: _*)

‎project/SonatypePublish.scala

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import sbt._
2+
import Keys._
3+
import sbtrelease.ReleasePlugin.autoImport._
4+
import sbtrelease.ReleaseStateTransformations._
5+
6+
object SonatypePublish {
7+
8+
protected def isSnapshot(s: String) = s.trim endsWith "SNAPSHOT"
9+
10+
protected val nexus = "https://oss.sonatype.org/"
11+
protected val ossSnapshots = "Sonatype OSS Snapshots" at nexus + "content/repositories/snapshots/"
12+
protected val ossStaging = "Sonatype OSS Staging" at nexus + "service/local/staging/deploy/maven2/"
13+
14+
val settings = Seq(
15+
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT")),
16+
homepage := Some(url("https://github.com/ing-bank/baker")),
17+
pomExtra := (
18+
<scm>
19+
<url>git@github.com:ing-bank/baker.git</url>
20+
<connection>scm:git:git@github.com:ing-bank/baker</connection>
21+
</scm>
22+
<developers>
23+
<developer>
24+
<id>Apollo</id>
25+
<name>Squad Apollo</name>
26+
</developer>
27+
</developers>
28+
),
29+
publishMavenStyle := true,
30+
publishTo <<= version((v: String) => Some(if (isSnapshot(v)) ossSnapshots else ossStaging)),
31+
publishArtifact in Test := false,
32+
pomIncludeRepository := (_ => false),
33+
releaseProcess := Seq[ReleaseStep](
34+
checkSnapshotDependencies,
35+
inquireVersions,
36+
runClean,
37+
runTest,
38+
setReleaseVersion,
39+
commitReleaseVersion,
40+
tagRelease,
41+
ReleaseStep(action = Command.process("publishSigned", _)),
42+
setNextVersion,
43+
commitNextVersion,
44+
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
45+
pushChanges
46+
)
47+
)
48+
}

0 commit comments

Comments
 (0)
Please sign in to comment.