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

Feature/compressing codecs #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
38 changes: 26 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
language: scala
sudo: required
dist: trusty
scala:
- 2.10.6
- 2.11.11
- 2.12.2
jdk:
- oraclejdk7
- oraclejdk8
group: edge

matrix:
exclude:
- scala: 2.12.2
jdk: oraclejdk7
include:
- jdk: oraclejdk8
scala: 2.10.6
env: COMMAND=ci PUBLISH=
- jdk: oraclejdk8
scala: 2.11.11
env: COMMAND=ci PUBLISH=
- jdk: oraclejdk8
scala: 2.12.3
env: COMMAND=ci PUBLISH=true

env:
global:
- secure: GRdfKNrJn/zqjaDWE+16HCfuCSf/wsDpLHocxrOSDiW6QCy73a+MYCujfB989YndQkrmGVkzdmAyKhcfTyYW/Sqjh/sJc2OOc6p+4CeMOGRcLV73wTwi9PjsrzzN0260HnICq3X+3ZUiLdkWoJPLfD6Mflj9iRjJBQIOtV0LzeU=
- secure: SPSIblLKFVns7pVY1x3SEs4/16htY5HUzRC51uWXeESE7Nwi3SvBY8LE2BqHygQl/9wKKOdOKoCIBoftukWupIi/r1rT2nVFHremO23Y36hcffN+PFXtW6NIohwIoX34O6G7VGuS2b71IZQHqwr88bY4aHeU4jI3MtU3nXhbEMI=
- secure: YVx2BSSsqF7LdYTwinf6o8nqJiYL9FeFAm1HDLxt+ltuMAEbFprOEDA763FANZoUino0uYtOBQ9jWqgMsoo+DvWFrBk4eExC9jGRk7Y/aWw6lx+TCbISGYztkhREQf73JKjbejoxLXf9h9gfo3MpPdrQhzMd2zVKOgSNf8FddZA=

script:
- sbt -J-Xmx6144m ++$TRAVIS_SCALA_VERSION $COMMAND
after_success:
- ./project/publish

services:
- docker

before_install:
- sudo service memcached stop
- docker pull memcached
- docker run -d -p 127.0.0.1:11211:11211 memcached memcached
script: "sbt clean coverage test"
after_success: "sbt coverageReport coveralls"

cache:
directories:
- $HOME/.sbt/0.13
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Shade - Memcached Client for Scala

[![Build Status](https://travis-ci.org/monix/shade.svg?branch=master)](https://travis-ci.org/monix/shade)
[![Coverage Status](https://coveralls.io/repos/monix/shade/badge.svg?branch=master&service=github)](https://coveralls.io/github/alexandru/shade?branch=master)
[![Join the chat at https://gitter.im/monix/shade](https://badges.gitter.im/monix/shade.svg)](https://gitter.im/monix/shade?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Overview
Expand All @@ -23,6 +22,7 @@ Supported for Scala versions: 2.10, 2.11 and 2.12.

## Release Notes

- [Version 1.10.x](release-notes/1.10.md)
- [Version 1.9.x](release-notes/1.9.md)
- [Version 1.8.x](release-notes/1.8.md)
- [Version 1.7.x](release-notes/1.7.md)
Expand All @@ -38,7 +38,7 @@ These are the people maintaining this project that you can annoy:
## Usage From SBT

```scala
dependencies += "io.monix" %% "shade" % "1.9.5"
dependencies += "io.monix" %% "shade" % "1.10.0"
```

### Initializing the Memcached Client
Expand Down
99 changes: 62 additions & 37 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name := "shade"

version := "1.9.5"

organization := "io.monix"

scalaVersion := "2.11.11"

crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.2")
addCommandAlias("ci", ";clean ;compile ;test ;package")
addCommandAlias("release", ";+publishSigned ;sonatypeReleaseAll")

scalaVersion := "2.11.11"
crossScalaVersions := Seq("2.10.6", "2.11.11", "2.12.3")
compileOrder in ThisBuild := CompileOrder.JavaThenScala

scalacOptions ++= {
Expand Down Expand Up @@ -56,9 +54,7 @@ scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
scalacOptions in (Compile, doc) ~= (_ filterNot (_ == "-Xfatal-warnings"))

resolvers ++= Seq(
"Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases",
"Spy" at "http://files.couchbase.com/maven2/",
Resolver.sonatypeRepo("snapshots")
"Spy" at "http://files.couchbase.com/maven2/"
)

libraryDependencies ++= Seq(
Expand All @@ -72,47 +68,76 @@ libraryDependencies ++= Seq(

libraryDependencies += ("org.scala-lang" % "scala-reflect" % scalaVersion.value % "compile")

// -- Settings meant for deployment on oss.sonatype.org
//------------- For Release

useGpg := true
useGpgAgent := true
useGpg := false
usePgpKeyHex("2673B174C4071B0E")
pgpPublicRing := baseDirectory.value / "project" / ".gnupg" / "pubring.gpg"
pgpSecretRing := baseDirectory.value / "project" / ".gnupg" / "secring.gpg"
pgpPassphrase := sys.env.get("PGP_PASS").map(_.toArray)

enablePlugins(GitVersioning)

/* The BaseVersion setting represents the in-development (upcoming) version,
* as an alternative to SNAPSHOTS.
*/
git.baseVersion := "1.11.0"

val ReleaseTag = """^v([\d\.]+)$""".r
git.gitTagToVersionNumber := {
case ReleaseTag(v) => Some(v)
case _ => None
}

git.formattedShaVersion := {
val suffix = git.makeUncommittedSignifierSuffix(git.gitUncommittedChanges.value, git.uncommittedSignifier.value)

git.gitHeadCommit.value map { _.substring(0, 7) } map { sha =>
git.baseVersion.value + "-" + sha + suffix
}
}

sonatypeProfileName := organization.value

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

publishMavenStyle := true

publishTo := {
val nexus = "https://oss.sonatype.org/"
isSnapshot := version.value endsWith "SNAPSHOT"

publishTo := Some(
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
Opts.resolver.sonatypeSnapshots
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
Opts.resolver.sonatypeStaging
)

publishArtifact in Test := false
pomIncludeRepository := { _ => false } // removes optional dependencies

scalariformSettings

pomExtra in ThisBuild :=
<url>https://github.com/monix/shade</url>
<licenses>
<license>
<name>The MIT License</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:monix/shade.git</url>
<connection>scm:git:[email protected]:monix/shade.git</connection>
</scm>
<developers>
<developer>
<id>alex_ndc</id>
<name>Alexandru Nedelcu</name>
<url>https://alexn.org</url>
</developer>
</developers>
licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/monix/shade"))

scmInfo := Some(
ScmInfo(
url("https://github.com/monix/shade.git"),
"scm:[email protected]:monix/shade.git"
))

developers := List(
Developer(
id="alexelcu",
name="Alexandru Nedelcu",
email="[email protected]",
url=url("https://alexn.org")
))

// Multi-project-related

Expand Down
Binary file added project/.gnupg/pubring.gpg
Binary file not shown.
Binary file added project/.gnupg/secring.gpg
Binary file not shown.
12 changes: 4 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.1.0")

addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.18")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.18")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")
43 changes: 43 additions & 0 deletions project/publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env ruby

def exec(cmd)
abort("Error encountered, aborting") unless system(cmd)
end

puts "CI=#{ENV['CI']}"
puts "TRAVIS_BRANCH=#{ENV['TRAVIS_BRANCH']}"
puts "TRAVIS_PULL_REQUEST=#{ENV['TRAVIS_PULL_REQUEST']}"
puts "PUBLISH=#{ENV['PUBLISH']}"
puts "SONATYPE_USER=xxxx" if ENV['SONATYPE_USER']
puts "SONATYPE_PASS=xxxx" if ENV['SONATYPE_PASS']
puts "PGP_PASS=xxxx" if ENV['PGP_PASS']
puts

unless ENV['CI'] == 'true'
abort("ERROR: Not running on top of Travis, aborting!")
end

unless ENV['PUBLISH'] == 'true'
puts "Publish is disabled"
exit
end

branch = ENV['TRAVIS_BRANCH']
version = nil

unless branch =~ /^v(\d+\.\d+\.\d+)$/ ||
(branch == "snapshot" && ENV['TRAVIS_PULL_REQUEST'] == 'false')

puts "Only deploying docs on the `publish` branch, or for version tags " +
"and not for pull requests or other branches, exiting!"
exit 0
else
version = $1
puts "Version branch detected: #{version}" if version
end

# Forcing a change to the root directory, if not there already
Dir.chdir(File.absolute_path(File.join(File.dirname(__FILE__), "..")))

# Go, go, go
exec("sbt release")
7 changes: 7 additions & 0 deletions release-notes/1.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Version 1.10.0 - Aug 16, 2017

- Update SBT to 0.13.15
- Update Scala versions
- Update SpyMemcached
- Add ability to configure the `timeoutThreshold`
- Configure project for automatic releases from Travis
Loading