Skip to content

Commit

Permalink
Release on merge (#26)
Browse files Browse the repository at this point in the history
* adding sbt release early

* moving coverage back to after_success

* release only if it has a tag
  • Loading branch information
dmateusp committed Oct 26, 2018
1 parent 0a592d0 commit 04b1896
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,4 +8,5 @@ project/plugins/project/
.history
.cache
.lib/
local.*
.DS_Store
32 changes: 13 additions & 19 deletions .travis.yml
@@ -1,31 +1,25 @@
# Use container-based infrastructure
sudo: false

before_cache:
# Cleanup the cached directories to avoid unnecessary cache updates
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete

# These directories are cached to S3 at the end of the build
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt

- "$HOME/.ivy2/cache"
- "$HOME/.sbt"
language: scala

jdk: oraclejdk8

scala:
- 2.12.7

- 2.12.7
script:
- sbt ++$TRAVIS_SCALA_VERSION clean coverage test scalafmtCheck scalafmtSbtCheck

- sbt ++$TRAVIS_SCALA_VERSION clean coverage test scalafmtCheck scalafmtSbtCheck
after_success:
- sbt ++$TRAVIS_SCALA_VERSION coverageReport coveralls

# These branches only will run build on commit
- sbt ++$TRAVIS_SCALA_VERSION coverageReport coveralls
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then sbt ++$TRAVIS_SCALA_VERSION releaseEarly;
fi
before_install:
- if [ -n "${TRAVIS_TAG}" && $TRAVIS_PULL_REQUEST = 'false' ]; then openssl aes-256-cbc -K $encrypted_dcc5d8de5fcf_key
-iv $encrypted_dcc5d8de5fcf_iv -in travis/secrets.tar.enc -out travis/local.secrets.tar
-d; tar xv -C travis -f travis/secrets.tar; fi
branches:
only:
- master
21 changes: 19 additions & 2 deletions build.sbt
@@ -1,6 +1,5 @@
name := "fs2-aws"
organization := "com.hbc"
version := "0.0.2-SNAPSHOT"
organization := "io.github"

scalaVersion := "2.12.7"

Expand Down Expand Up @@ -32,3 +31,21 @@ addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3")
// coverage
coverageMinimum := 40
coverageFailOnMinimum := true

// sonatype
licenses := Seq("MIT" -> url("https://github.com/dmateusp/fs2-aws/blob/master/LICENSE"))
developers := List(
Developer(id = "dmateusp",
name = "Daniel Mateus Pires",
email = "dmateusp@gmail.com",
url = url("https://github.com/dmateusp"))
)
homepage := Some(url("https://github.com/dmateusp/fs2-aws"))
scmInfo := Some(
ScmInfo(url("https://github.com/dmateusp/fs2-aws"),
"scm:git:git@github.com:dmateusp/fs2-aws.git"))

// These are the sbt-release-early settings to configure
pgpPublicRing := file("./travis/local.pubring.asc")
pgpSecretRing := file("./travis/local.secring.asc")
releaseEarlyWith := SonatypePublisher
6 changes: 5 additions & 1 deletion project/plugins.sbt
@@ -1,5 +1,9 @@
// scala format
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")

// coverage
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")

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

// release
addSbtPlugin("ch.epfl.scala" % "sbt-release-early" % "2.1.1")
Binary file added travis/secrets.tar.enc
Binary file not shown.

0 comments on commit 04b1896

Please sign in to comment.