Skip to content

Commit

Permalink
making release go through staging
Browse files Browse the repository at this point in the history
  • Loading branch information
wheaties committed Jun 6, 2015
1 parent 5f20295 commit ff14409
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 31 deletions.
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import AutoLift._

lazy val autoz = build("autolift", "autoz").settings(
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-core" % ScalaZ,
"org.scalatest" %% "scalatest" % "2.2.1" % "test"),
"org.scalaz" %% "scalaz-core" % ScalaZ,
"org.scalatest" %% "scalatest" % "2.2.1" % "test"),
sonatypeProfileName := "wheaties",
wartremoverErrors in (Compile, compile) ++= Warts.allBut(Wart.Var, Wart.NoNeedForMonad)
).settings(tutSettings: _*)
)

scalaVersion := AutoLift.ScalaVersion
61 changes: 33 additions & 28 deletions project/AutoLift.scala
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
import sbt._
import sbt.Keys._
import xerial.sbt.Sonatype._

object AutoLift{
val ScalaVersion = "2.11.5"
val ScalaZ = "7.1.1"

def build(pjName: String, base: String) = Project(id = pjName, base = file(base))
.settings(
scalaVersion := ScalaVersion,
name := pjName,
scalacOptions := Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:higherKinds",
"-language:existentials",
"-unchecked",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-value-discard"),
pomExtra := autoliftPom,
publishTo <<= version { v: String =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
pomIncludeRepository := { x => false },
publishMavenStyle := true,
publishArtifact in Test := false
def build(pjName: String, base: String) = Project(
id = pjName,
base = file(base),
settings = sonatypeSettings ++
Seq(
scalaVersion := ScalaVersion,
name := pjName,
organization := "com.github.wheaties",
scalacOptions := Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:higherKinds",
"-language:existentials",
"-unchecked",
"-Xfatal-warnings",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-value-discard"),
pomExtra := autoliftPom,
publishTo <<= version { v: String =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
pomIncludeRepository := { x => false },
publishMavenStyle := true,
publishArtifact in Test := false
)
)

val autoliftPom =
Expand All @@ -54,5 +60,4 @@ object AutoLift{
<url>www.github.com/wheaties</url>
</developer>
</developers>

}

0 comments on commit ff14409

Please sign in to comment.