Skip to content

Commit f607e1a

Browse files
committed
fiddling with travis build
1 parent 4010526 commit f607e1a

File tree

3 files changed

+67
-51
lines changed

3 files changed

+67
-51
lines changed

.travis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@ sudo: false
44
language: scala
55

66
scala:
7-
- 2.11.2
7+
- 2.11.2
8+
9+
cache:
10+
directories:
11+
- $HOME/.ivy2/cache
12+
- $HOME/.sbt/boot
813

914
script:
10-
- sbt clean coverage test && sbt coverageAggregate
15+
- sbt clean coverage test && sbt coverageAggregate
16+
# Tricks to avoid unnecessary cache updates
17+
- find $HOME/.sbt -name "*.lock" | xargs rm
18+
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
1119

1220
after_success:
13-
- sbt coveralls
14-
- sbt 'set credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", System.getenv("SONATYPE_USER"), System.getenv("SONATYPE_PASS"))' publish
21+
- sbt coveralls
22+
- sbt publish
1523

1624
env:
1725
global:

build.sbt

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,50 +47,4 @@ addCompilerPlugin("org.scala-lang.plugins" % "scala-continuations-plugin_2.11.2"
4747
scalacOptions += "-P:continuations:enable"
4848

4949
// code coverage
50-
scoverage.ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := false
51-
52-
// maven publishing
53-
publishMavenStyle := true
54-
55-
publishArtifact in Test := false
56-
57-
pomIncludeRepository := { _ => false }
58-
59-
publishTo := {
60-
val nexus = "https://oss.sonatype.org/"
61-
val repo = if (version.value.trim.endsWith("SNAPSHOT"))
62-
"snapshots" at nexus + "content/repositories/snapshots"
63-
else
64-
"releases" at nexus + "service/local/staging/deploy/maven2"
65-
Some(repo)
66-
}
67-
68-
releasePublishArtifactsAction := PgpKeys.publishSigned.value
69-
70-
sonatypeProfileName := "org.scala-lang"
71-
72-
// Invalid POM: Project URL missing, License information missing, SCM URL missing, Developer information missing
73-
74-
description := "Lightweight Modular Staging"
75-
76-
homepage := Some(url("https://scala-lms.github.io"))
77-
78-
licenses := List("BSD-like" -> url("http://github.com/TiarkRompf/virtualization-lms-core/tree/master/LICENSE"))
79-
80-
scmInfo := Some(ScmInfo(url("https://github.com/TiarkRompf/virtualization-lms-core"), "[email protected]:TiarkRompf/virtualization-lms-core.git"))
81-
82-
// developers := List(Developer("tiarkrompf", "Tiark Rompf", "@tiarkrompf", url("http://github.com/tiarkrompf")))
83-
84-
pomExtra in Global := {
85-
<developers>
86-
<developer>
87-
<id>tiarkrompf</id>
88-
<name>Tiark Rompf</name>
89-
<url>https://github.com/tiarkrompf</url>
90-
</developer>
91-
</developers>
92-
}
93-
94-
95-
96-
// NOTE: sonatypeRelease must be run explicitly, after `sbt release`
50+
scoverage.ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := false

publish.sbt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// maven publishing
2+
publishMavenStyle := true
3+
4+
publishArtifact in Test := false
5+
6+
pomIncludeRepository := { _ => false }
7+
8+
publishTo := {
9+
val nexus = "https://oss.sonatype.org/"
10+
val repo = if (version.value.trim.endsWith("SNAPSHOT"))
11+
"snapshots" at nexus + "content/repositories/snapshots"
12+
else
13+
"releases" at nexus + "service/local/staging/deploy/maven2"
14+
Some(repo)
15+
}
16+
17+
releasePublishArtifactsAction := PgpKeys.publishSigned.value
18+
19+
sonatypeProfileName := "org.scala-lang"
20+
21+
// Invalid POM: Project URL missing, License information missing, SCM URL missing, Developer information missing
22+
23+
description := "Lightweight Modular Staging"
24+
25+
homepage := Some(url("https://scala-lms.github.io"))
26+
27+
licenses := List("BSD-like" -> url("http://github.com/TiarkRompf/virtualization-lms-core/tree/master/LICENSE"))
28+
29+
scmInfo := Some(ScmInfo(url("https://github.com/TiarkRompf/virtualization-lms-core"), "[email protected]:TiarkRompf/virtualization-lms-core.git"))
30+
31+
// developers := List(Developer("tiarkrompf", "Tiark Rompf", "@tiarkrompf", url("http://github.com/tiarkrompf")))
32+
33+
pomExtra in Global := {
34+
<developers>
35+
<developer>
36+
<id>tiarkrompf</id>
37+
<name>Tiark Rompf</name>
38+
<url>https://github.com/tiarkrompf</url>
39+
</developer>
40+
</developers>
41+
}
42+
43+
(for {
44+
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
45+
password <- Option(System.getenv().get("SONATYPE_PASSWORD"))
46+
} yield
47+
credentials += Credentials(
48+
"Sonatype Nexus Repository Manager",
49+
"oss.sonatype.org",
50+
username,
51+
password)
52+
).getOrElse(credentials ++= Seq())
53+
54+
// NOTE: sonatypeRelease must be run explicitly, after `sbt release`

0 commit comments

Comments
 (0)