aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.ci/build43
-rw-r--r--.ci/sec.gpg.encbin0 -> 3616 bytes
-rw-r--r--.travis.yml8
-rw-r--r--build.sbt7
-rw-r--r--build.sh.encbin0 -> 400 bytes
-rw-r--r--project/plugins.sbt2
6 files changed, 55 insertions, 5 deletions
diff --git a/.ci/build b/.ci/build
new file mode 100755
index 0000000..8ec9185
--- /dev/null
+++ b/.ci/build
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o verbose
+
+sbt +compile +tests/run
+
+# 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-keys \
+ "DC6A9A5E884B2D680E080467E107A4A6CF561C67"
+ openssl aes-256-cbc \
+ -K "$encrypted_c8feacd00769_key" \
+ -iv "$encrypted_c8feacd00769_iv" \
+ -in .ci/sec.gpg.enc \
+ -out sec.gpg \
+ -d
+ gpg --import sec.gpg
+
+ # Setup sbt-pgp plugin
+ cat <<-EOF > gpg.sbt
+ pgpSigningKey in Global := Some(0xE107A4A6CF561C67l)
+ useGpgAgent in Global := true
+ useGpg in Global := true
+ EOF
+
+ # Setup publishing
+ cat <<-EOF > sonatype.sbt
+ credentials in Global += Credentials(
+ "Sonatype Nexus Repository Manager",
+ "oss.sonatype.org",
+ "8VNUX6+2",
+ "$SONATYPE_PASS"
+ )
+ EOF
+
+ sbt \
+ +coreJVM/publishSigned \
+ +coreJS/publishSigned \
+ +coreNative/publishSigned \
+ sonatypeRelease
+fi
diff --git a/.ci/sec.gpg.enc b/.ci/sec.gpg.enc
new file mode 100644
index 0000000..ded18e1
--- /dev/null
+++ b/.ci/sec.gpg.enc
Binary files differ
diff --git a/.travis.yml b/.travis.yml
index c0979ac..c613524 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,8 +4,12 @@ language: scala
before_install:
- curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x
+
+env:
+ global:
+ secure: "g/iUUMHR5Dnhkr4s1yJCzq4026MdsKFtRq/40sffldNP7HvYKCjf1t8y+3qtNuGaOOIV+n8z0t0kDVszEOv7JTXe9o0lnvzyM7qpdhh9TticEKc/woNB20rWtQXVla1oYr+iYqs9ygTrFrcgAzFSUjlIvrKPlw4yXb06swKFJ15w9j9ol81iVChKAruzBz4ZtoT6I2b8iatRBDXDG/SZqiT3YleIqvDpHMLNbbwk1ru68GjGpjbAxECX5mCXfC0W0k+WweDGDlHpYvMCMCjmvU6auUPMUknBnJYSzuagv2LxNMHb8zaVrff+s0vKnnF4diG7xiM8qcHBEgoyGZ0o0oQs2X/S4cgqxAON2pOzGctHt3yKRkmYtakGkNge223Sdj4nB0v70Rpzs/hSbzebbSM4GtfGoCF26wj7nrm/bxvc41bSg1v3kvOJNWUiWBBQ7VWEQuzbKASOFu7cQzZWWjikZzMRxTBWIanzfHRbeWjuInL4YxWTMoFmUc4ELCgClqyQmWS9Xz2vJqzbkyy9qX3daY4hxB49HPw1hRn25vAXWATEBdSWONGPCquNsDs+P8w+vo7BnqSeXx5maaqXbjp7xZKP/5RHhL4TlWPDzlQgh+hKLe4rkLcqs5nLksQ2ybppGhX4JiT0pmesH94qj2u7tQL2NGOZpXCfXRDDHoM="
-script:
- - sbt +compile +tests/run
+script: .ci/build
+
jdk:
- oraclejdk8
diff --git a/build.sbt b/build.sbt
index 7d29f36..7c78b0b 100644
--- a/build.sbt
+++ b/build.sbt
@@ -79,9 +79,12 @@ lazy val benchmarks = project
.dependsOn(examplesJVM)
lazy val buildSettings = Seq(
- organization := "com.propensive",
+ organization in ThisBuild := "io.crashbox",
name := "magnolia",
- version := "0.8.0",
+ version in ThisBuild := {
+ import sys.process._
+ ("git describe --always --dirty=-SNAPSHOT --match v[0-9].*" !!).tail.trim
+ },
scalacOptions ++= Seq(
"-deprecation",
"-feature",
diff --git a/build.sh.enc b/build.sh.enc
new file mode 100644
index 0000000..9e97562
--- /dev/null
+++ b/build.sh.enc
Binary files differ
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 5e8b926..7d35fda 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,4 +1,4 @@
-addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
+addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")