Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Includes sbt-catalysts-extras plugin and Common settings #78

Merged
merged 1 commit into from
Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
language: scala
scala:
- 2.11.8
- 2.11.8
jdk:
- oraclejdk8
- oraclejdk8
before_install:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc
-K $encrypted_37b99bd39158_key -iv $encrypted_37b99bd39158_iv
-in secring.gpg.enc -out secring.gpg -d; fi
script:
- sbt coverage 'fetchJVM/test' 'fetchJVM/coverageReport'
- sbt 'monixJVM/test' 'monixJS/test'
- sbt 'fetchJS/test'
- sbt 'docs/tut'
- sbt 'readme/tut'
- sbt coverage 'fetchJVM/test' 'fetchJVM/coverageReport'
- sbt 'monixJVM/test' 'monixJS/test'
- sbt 'fetchJS/test'
- sbt 'docs/tut'
- sbt 'readme/tut'
after_success:
- bash <(curl -s https://codecov.io/bash) -t 47609994-e0cd-4f3b-a28d-eb558142c3bb
- bash <(curl -s https://codecov.io/bash) -t 47609994-e0cd-4f3b-a28d-eb558142c3bb
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then sbt
publishSigned; fi
71 changes: 22 additions & 49 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import de.heikoseeberger.sbtheader.AutomateHeaderPlugin
import de.heikoseeberger.sbtheader.license.Apache2_0
import catext.Dependencies._

val dev = Seq(Dev("47 Degrees (twitter: @47deg)", "47 Degrees"))
val gh = GitHubSettings("com.fortysevendeg", "fetch", "47 Degrees", apache)
val vAll = Versions(versions, libraries, scalacPlugins)

addCommandAlias("makeDocs", ";docs/tut;docs/makeSite")

pgpPassphrase := Some(sys.env.getOrElse("PGP_PASSPHRASE", "").toCharArray)
pgpPublicRing := file(s"${sys.env.getOrElse("PGP_FOLDER", ".")}/pubring.gpg")
pgpSecretRing := file(s"${sys.env.getOrElse("PGP_FOLDER", ".")}/secring.gpg")

lazy val buildSettings = Seq(
organization := "com.fortysevendeg",
organizationName := "47 Degrees",
organization := gh.org,
organizationName := gh.publishOrg,
description := "Simple & Efficient data access for Scala and Scala.js",
startYear := Option(2016),
homepage := Option(url("http://47deg.github.io/fetch/")),
Expand Down Expand Up @@ -35,18 +46,18 @@ lazy val commonSettings = Seq(
scalafmtConfig := Some(file(".scalafmt"))
) ++ reformatOnCompileSettings

lazy val allSettings = buildSettings ++ commonSettings ++ publishSettings

lazy val fetchJSSettings = Seq(
requiresDOM := false,
scalaJSUseRhino := false,
jsEnv := NodeJSEnv().value
)
lazy val allSettings = buildSettings ++
commonSettings ++
sharedCommonSettings ++
miscSettings ++
sharedReleaseProcess ++
credentialSettings ++
sharedPublishSettings(gh, dev)

lazy val fetch = crossProject.in(file("."))
.settings(moduleName := "fetch")
.settings(allSettings:_*)
.jsSettings(fetchJSSettings:_*)
.jsSettings(sharedJsSettings:_*)
.enablePlugins(AutomateHeaderPlugin)

lazy val fetchJVM = fetch.jvm
Expand All @@ -73,44 +84,6 @@ lazy val docs = (project in file("docs"))
.settings(docsSettings: _*)
.settings(noPublishSettings)

addCommandAlias("makeDocs", ";docs/tut;docs/makeSite")

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publishArtifact := false
)

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

lazy val publishSettings = Seq(
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", "")),
scmInfo := Some(ScmInfo(url("https://github.com/47deg/fetch"), "https://github.com/47deg/fetch.git")),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
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")
},
pomExtra :=
<developers>
<developer>
<name>47 Degrees (twitter: @47deg)</name>
<email>hello@47deg.com</email>
</developer>
<developer>
<name>47 Degrees</name>
</developer>
</developers>
)

lazy val readmeSettings = buildSettings ++ tutSettings ++ Seq(
tutSourceDirectory := baseDirectory.value,
Expand All @@ -137,7 +110,7 @@ lazy val monix = crossProject.in(file("monix"))
.dependsOn(fetch)
.settings(moduleName := "fetch-monix")
.settings(allSettings:_*)
.jsSettings(fetchJSSettings:_*)
.jsSettings(sharedJsSettings:_*)
.settings(monixSettings: _*)
.enablePlugins(AutomateHeaderPlugin)

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.13")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "1.5.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4" exclude("com.typesafe.sbt", "sbt-git"))
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.2")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.2.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")
addSbtPlugin("com.fortysevendeg" % "sbt-catalysts-extras" % "0.0.4")
18 changes: 18 additions & 0 deletions pubring.gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG v1.51

mQENBFgh9PIBCACUy6nU/56bEfQVyTdlXnenXZPeRv3PzMVgOwLIVB39Lpwyl5Ld
TF3aU4EHwFD5fy0W8mImCgLRn2cJmYauukS1kSXoKldixThvwmzISTodBfjirNdq
mHxgTrOJQAx0IQWKZHcuLb0kafc9fp/gbfUaP3fjgy1SiIIwAuIxVVKvHWn3eh/S
PkkTEWHtTLh+9GvMtiTTYekoMSFBvDGw1hptXM/+CCnvXMSc//YCAkyK+hZx+fjg
dJoullPNsfPgymsX1v4m3R2XaqiXVCSe5X8PQcZ96SlDIIoMPVPC9X7lJkrym2Km
zH7v0j2a6LR8gzTPzJWgW1AxYqm7T/1XtblRABEBAAG0ITQ3ZGVnL2ZldGNoIDxk
ZXZlbG9wZXJANDdkZWcuY29tPokBHAQTAQIABgUCWCH08gAKCRBWrGKFsjaSVUb7
B/9fj95K7DNl7bIJGvjFcMM/vlAk/TSrPiARSnJ9Ehj7Yl7PewSsWw0TXTX6XCN7
bWr2tt64tSUy7sQxYe3FKpOfHRdIwIoOn30dkCyv3cDlKz5npt1q/PjdQpPwSPsN
pVux86eQr2GwuYW5ZrXcM9Hv2xjWKmNxDN/PklvVAYp1hFq5LO+3G5CYChkKH8C9
UIQngIqb5tfXf6kF66PhogHT06e9bk+XxoBOK/BIoxhl9C+EfY0YLjh8Z9wVaO+O
Q76KHjHRGGwuVvko76mD5JrWt/VRsfvAREIYUu1I1anWZ+ZAPjAy8RXBBrClTSV/
tJ7Q1ynYVTfa9mwdDyMNvnET
=QCgm
-----END PGP PUBLIC KEY BLOCK-----
Binary file added secring.gpg.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.3.0"
version in ThisBuild := "0.3.0-SNAPSHOT"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should't this be 0.4.0-SNAPSHOT ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're trying to publish again 0.3.0 with sbt-release plugin. To accomplish it, we have to reboot version.sbt with latest snapshot published.