Skip to content

Commit

Permalink
Update publishing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rtimush committed Jul 26, 2020
1 parent 6ff9f05 commit aa4c1fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ThisBuild / organization := "com.timushev"
ThisBuild / gitVersioningSnapshotLowerBound := Some("0.5.0")
ThisBuild / publishTo := sonatypePublishToBundle.value

lazy val `scalatags-rx` = (projectMatrix in file("."))
.enablePlugins(SemVerPlugin)
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ resolvers += Resolver.bintrayIvyRepo("rallyhealth", "sbt-plugins")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.5.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.1")
addSbtPlugin("com.rallyhealth.sbt" % "sbt-git-versioning" % "1.4.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.4")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")

libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0"
41 changes: 6 additions & 35 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
import scala.xml.transform.{RewriteRule, RuleTransformer}
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}

licenses := Seq("BSD 3-Clause" -> url("https://github.com/rtimush/scalatags-rx/blob/master/LICENSE"))

homepage := Some(url("https://github.com/rtimush/scalatags-rx"))

developers := Developer("rtimush", "Roman Timushev", "rtimush@gmail.com", url("https://github.com/rtimush")) :: Nil

scmInfo := Some(ScmInfo(
ThisBuild / licenses := Seq("BSD 3-Clause" -> url("https://github.com/rtimush/scalatags-rx/blob/master/LICENSE"))
ThisBuild / homepage := Some(url("https://github.com/rtimush/scalatags-rx"))
ThisBuild / developers := Developer("rtimush", "Roman Timushev", "rtimush@gmail.com", url("https://github.com/rtimush")) :: Nil
ThisBuild / scmInfo := Some(ScmInfo(
url("https://github.com/rtimush/scalatags-rx"),
"scm:git:https://github.com/rtimush/scalatags-rx.git",
Some("scm:git:git@github.com:rtimush/scalatags-rx.git")
))

publishMavenStyle := true

publishTo := {
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

// workaround for sbt/sbt#1834
pomPostProcess := { (node: XmlNode) =>
new RuleTransformer(new RewriteRule {
override def transform(node: XmlNode): XmlNodeSeq = node match {
case e: Elem
if e.label == "developers" =>
<developers>
{developers.value.map { dev =>
<developer>
<id>{dev.id}</id>
<name>{dev.name}</name>
<email>{dev.email}</email>
<url>{dev.url}</url>
</developer>
}}
</developers>
case _ => node
}
}).transform(node).head
}

0 comments on commit aa4c1fc

Please sign in to comment.