Skip to content

Commit

Permalink
Merge pull request #11 from 47deg/issue-8-publish
Browse files Browse the repository at this point in the history
Issue 8 publish
  • Loading branch information
noelmarkham committed Jul 26, 2016
2 parents ca5c0ef + ea7ca8b commit c67203c
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ lazy val docsSettings =

lazy val root = (project in file("."))
.settings(moduleName := "scalacheck-datetime")
.settings(version := "0.2.0-SNAPSHOT")
.settings(scalacheckDatetimeSettings:_ *)

lazy val docs = (project in file("docs"))
Expand Down
6 changes: 4 additions & 2 deletions docs/src/tut/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ Any issues, suggestions or criticisms are more than welcome.
For SBT, you can add the dependency to your project's build file:

```scala
"com.fortysevendeg" %% "scalacheck-datetime" % "0.1-SNAPSHOT"
resolvers += Resolver.sonatypeRepo("releases")

"com.fortysevendeg" %% "scalacheck-datetime" % "0.1.0" % "test"
```

# Current Status

As of version 0.1, the following libraries and classes are supported:
As of version 0.1.0, the following libraries and classes are supported:

* [Joda Time](http://www.joda.org/joda-time/): The [`DateTime`](http://joda-time.sourceforge.net/apidocs/org/joda/time/DateTime.html) class, and [`Period`](http://joda-time.sourceforge.net/apidocs/org/joda/time/Period.html) for specifying a range of time.
* [Java SE 8 Date and Time](http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html): The [`ZonedDateTime`](https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html) and [`Duration`](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html) classes.
Expand Down
4 changes: 3 additions & 1 deletion docs/src/tut/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ arbitrary[DateTime].sample
### Installation

```scala
"com.fortysevendeg" %% "scalacheck-datetime" % "0.1-SNAPSHOT"
resolvers += Resolver.sonatypeRepo("releases")

"com.fortysevendeg" %% "scalacheck-datetime" % "0.1.0" % "test"
```


Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4" exclude("com.typesafe.
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
56 changes: 56 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
organizationName := "47 Degrees"

organizationHomepage := Some(new URL("http://47deg.com"))

publishMavenStyle := true

startYear := Some(2016)

description := "A library for helping use date and time libraries with ScalaCheck"

homepage := Some(url("http://47deg.com"))

scmInfo := Some(ScmInfo(url("https://github.com/47deg/scalacheck-datetime"), "https://github.com/47deg/scalacheck-datetime.git"))

licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))

pomExtra :=
<developers>
<developer>
<name>47 Degrees (twitter: @47deg)</name>
<email>hello@47deg.com</email>
</developer>
<developer>
<name>47 Degrees</name>
</developer>
</developers>

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")
}

lazy val gpgFolder = sys.env.getOrElse("GPG_FOLDER", ".")

pgpPassphrase := Some(sys.env.getOrElse("GPG_PASSPHRASE", "").toCharArray)

pgpPublicRing := file(s"$gpgFolder/pubring.gpg")

pgpSecretRing := file(s"$gpgFolder/secring.gpg")

credentials += Credentials("Sonatype Nexus Repository Manager",
"oss.sonatype.org",
sys.env.getOrElse("PUBLISH_USERNAME", ""),
sys.env.getOrElse("PUBLISH_PASSWORD", ""))

publishArtifact in Test := false

lazy val publishSnapshot = taskKey[Unit]("Publish only if the version is a SNAPSHOT")

publishSnapshot := Def.taskDyn {
if (isSnapshot.value) Def.task { PgpKeys.publishSigned.value }
else Def.task(println("Actual version is not a Snapshot. Skipping publish."))
}.value

0 comments on commit c67203c

Please sign in to comment.