aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2018-05-03 16:21:39 -0700
committerJakob Odersky <jakob@driver.xyz>2018-05-03 16:21:39 -0700
commitd7fd38798b24638b095357d4a96a7d3158fa4174 (patch)
treee9482c63aebc31b537dbfb2a0ca6a6a7edd668e8
parent095431f7e014cda1c7522236531c67258b4bc58d (diff)
downloadsbt-settings-d7fd38798b24638b095357d4a96a7d3158fa4174.tar.gz
sbt-settings-d7fd38798b24638b095357d4a96a7d3158fa4174.tar.bz2
sbt-settings-d7fd38798b24638b095357d4a96a7d3158fa4174.zip
Set up continuous deploymentv1.0.10
-rwxr-xr-x.ci/build31
-rw-r--r--.ci/sec.gpg.encbin0 -> 2480 bytes
-rw-r--r--.travis.yml20
-rw-r--r--build.sbt13
-rw-r--r--project/build.properties2
-rw-r--r--project/plugins.sbt8
-rw-r--r--project/publish.sbt2
-rw-r--r--publish.sbt32
-rw-r--r--version.sbt1
9 files changed, 77 insertions, 32 deletions
diff --git a/.ci/build b/.ci/build
new file mode 100755
index 0000000..ad52e38
--- /dev/null
+++ b/.ci/build
@@ -0,0 +1,31 @@
+#!/bin/bash
+set -ev
+
+sbt \
+ scalafmt::test \
+ test
+
+# Automatic publishing for tags that start with `v<digit>`
+if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_TAG" =~ ^v[0-9].* ]]; then
+ # Setup gpg keys
+ gpg --keyserver keyserver.ubuntu.com --recv-key "DC7751D77486D755815C04AB488F99C904F077E8"
+ openssl aes-256-cbc -K "$encrypted_1d7419ab335d_key" -iv "$encrypted_1d7419ab335d_iv" -in .ci/sec.gpg.enc -out sec.gpg -d
+ gpg --import sec.gpg
+
+ # Set up publishing settings and credentials
+ cat <<EOF > credentials.sbt
+ useGpg in Global := true
+ pgpSigningKey in Global := Some(0x488F99C904F077E8l)
+ credentials in Global += Credentials(
+ "Sonatype Nexus Repository Manager",
+ "oss.sonatype.org",
+ "vZKBpUCV",
+ "$SONATYPE_PASS"
+ )
+EOF
+
+ # Publish and release
+ sbt \
+ publishSigned \
+ sonatypeRelease
+fi
diff --git a/.ci/sec.gpg.enc b/.ci/sec.gpg.enc
new file mode 100644
index 0000000..79dec9c
--- /dev/null
+++ b/.ci/sec.gpg.enc
Binary files differ
diff --git a/.travis.yml b/.travis.yml
index 152b8f7..c841aab 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,18 +1,18 @@
language: scala
-
jdk:
- - oraclejdk8
+ - oraclejdk8 # this should be changed to openjdk as soon as it becomes available on Travis CI
+
+env:
+ - secure: "qZvexfj0uZLwgn0aKy9rQjBCw8LHbSQJNlA/DrNHDi10SsABNgeE4EDyoPD9+csNchbBmPpUObROCm7k/bDPLO6+cgncHbZlfqet0PGryGldF6XzY0uWVl06l40YXZrCyxeRcIKHzkneo4q3zSxJlkWXFBxFPanZVzyO94riMopKpDT41bKLqdiWIboq7ydeZWo538fuSOKjZjoTWwexX5KMnTePGeYVS2vbJIUXHa6kEzXx5MU8Lf1VcnGQER/1KMN7OrAtqJ72zvo/K6mcU1XGkEYxqQK2hxt3kUACunb1NWQoWjCKWKB9TgiCd/sOAkzhNgnZoYpcSXkBK0XPbjmYNHnIXL1aLdHl3n2jzpjVimFUzW8m7tMqJPJMn1igY+xTqjpoRI8sGS47XQMIhbH0SEQpwU0yY+Lnxo3WcXw0o+r3lW+P4jGv1PrzF6EkERjRICjU0B5XRXwgejvzuETjkzJRfiuvgSpdeCnlO6JK1IoKalJGMETme/Nb5pJfaFMzZ7UsnQzXwPZtZXKYEeWwt86RFggd/P6vmUcK4E1wOMXI5TRdIEN7RVA06GgzU5va7M41er1j8c2yCiu89YYLXchupQvoBAmLqWa5C/fk5dXVatsv13/XXuHBl6BFNRS/Rd850Z/254nQxAdupcZzztX5oMKu/QxBkor27wY="
-scala:
- - 2.11.11
+script: .ci/build
cache:
directories:
- - $HOME/.ivy2/cache
+ - "$HOME/.ivy2/cache"
+ - "$HOME/.sbt/boot/"
before_cache:
- # Delete all ivydata files since ivy touches them on each build
- - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print0 | xargs -n10 -0 rm
- - find $HOME/.ivy2/cache -name "*-SNAPSHOT*" -print0 | xargs -n10 -0 rm
-
-script: "sbt clean test"
+ - find $HOME/.ivy2/cache/xyz.driver -depth -name "sbt-settings*" -exec rm -r {} \;
+ - find $HOME/.ivy2 -name "ivydata-*.properties" -delete
+ - find $HOME/.sbt -name "*.lock" -delete
diff --git a/build.sbt b/build.sbt
index d1ee106..21b06e2 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,12 +1,7 @@
sbtPlugin := true
-organization := "xyz.driver"
name := "sbt-settings"
-scalaVersion := "2.12.3"
-
-publishMavenStyle := true
-
-resolvers += Resolver.sbtPluginRepo("releases")
+scalaVersion := "2.12.5"
addSbtPlugin("com.lucidchart" %% "sbt-scalafmt" % "1.14")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
@@ -21,9 +16,3 @@ addSbtPlugin("com.github.gseitz" %% "sbt-release" % "1.0.7")
// the following prevents thousands of meaningless stacktraces by docker plugin on JDK 9
libraryDependencies += "javax.activation" % "activation" % "1.1.1" % Test
-
-publishTo := {
- val jfrog = "https://drivergrp.jfrog.io/drivergrp/"
- if (isSnapshot.value) Some("snapshots" at jfrog + "snapshots")
- else Some("releases" at jfrog + "releases")
-}
diff --git a/project/build.properties b/project/build.properties
index b7dd3cb..64cf32f 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=1.0.2
+sbt.version=1.1.4
diff --git a/project/plugins.sbt b/project/plugins.sbt
index bdd7ab1..4da7bd5 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,9 +1 @@
-// Code style plugins
-addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("com.lucidchart" %% "sbt-scalafmt" % "1.14")
-
-// Launch and deploy/release plugins
-addSbtPlugin("io.spray" %% "sbt-revolver" % "0.9.1")
-addSbtPlugin("com.eed3si9n" %% "sbt-buildinfo" % "0.7.0")
-addSbtPlugin("com.typesafe.sbt" %% "sbt-git" % "0.9.3")
-addSbtPlugin("com.github.gseitz" %% "sbt-release" % "1.0.7")
diff --git a/project/publish.sbt b/project/publish.sbt
new file mode 100644
index 0000000..1c70137
--- /dev/null
+++ b/project/publish.sbt
@@ -0,0 +1,2 @@
+addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
+addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
diff --git a/publish.sbt b/publish.sbt
new file mode 100644
index 0000000..645dea3
--- /dev/null
+++ b/publish.sbt
@@ -0,0 +1,32 @@
+version in ThisBuild := {
+ import sys.process._
+ ("git describe --always --dirty=-SNAPSHOT --match v[0-9].*" !!).tail.trim
+}
+organization in ThisBuild := "xyz.driver"
+licenses in ThisBuild := Seq(
+ ("Apache 2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
+homepage in ThisBuild := Some(
+ url("https://github.com/drivergroup/sbt-settings"))
+publishMavenStyle in ThisBuild := true
+publishTo in ThisBuild := Some(
+ if (isSnapshot.value)
+ Opts.resolver.sonatypeSnapshots
+ else
+ Opts.resolver.sonatypeStaging
+)
+
+scmInfo in ThisBuild := Some(
+ ScmInfo(
+ url("https://github.com/drivergroup/sbt-settings"),
+ "scm:git@github.com:drivergroup/sbt-settings.git"
+ )
+)
+
+developers in ThisBuild := List(
+ Developer(
+ id = "jodersky",
+ name = "Jakob Odersky",
+ email = "jakob@driver.xyz",
+ url = url("https://driver.xyz")
+ )
+)
diff --git a/version.sbt b/version.sbt
deleted file mode 100644
index 2bfdcfb..0000000
--- a/version.sbt
+++ /dev/null
@@ -1 +0,0 @@
-version in ThisBuild := "1.0.10-SNAPSHOT"