Skip to content

Commit 34b2b41

Browse files
committed
publish only branches called develop* and never PRs
1 parent c27056b commit 34b2b41

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ cache:
1313

1414
script:
1515
- sbt clean coverage test && sbt coverageAggregate
16-
# Tricks to avoid unnecessary cache updates
16+
# Tricks to avoid unnecessary cache updates
1717
- find $HOME/.sbt -name "*.lock" | xargs rm
1818
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
1919

2020
after_success:
2121
- sbt coveralls
22-
- sbt publish
22+
- [[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "develop"* ]] && sbt publish
2323

2424
env:
2525
global:

build.sbt

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
name := "LMS"
1+
// --- project info ---
22

3-
organization := "org.scala-lang.virtualized"
3+
name := "lms-core"
44

5-
scalaOrganization := "org.scala-lang.virtualized"
5+
organization := "org.scala-lms"
6+
7+
description := "Lightweight Modular Staging"
8+
9+
homepage := Some(url("https://scala-lms.github.io"))
10+
11+
licenses := List("BSD-like" -> url("https://github.com/TiarkRompf/virtualization-lms-core/blob/develop/LICENSE"))
12+
13+
scmInfo := Some(ScmInfo(url("https://github.com/TiarkRompf/virtualization-lms-core"), "[email protected]:TiarkRompf/virtualization-lms-core.git"))
14+
15+
// developers := List(Developer("tiarkrompf", "Tiark Rompf", "@tiarkrompf", url("http://github.com/tiarkrompf")))
16+
17+
18+
// --- scala settings ---
619

720
scalaVersion := virtScala
821

22+
scalaOrganization := "org.scala-lang.virtualized"
23+
924
scalaSource in Compile <<= baseDirectory(_ / "src")
1025

1126
scalaSource in Test <<= baseDirectory(_ / "test-src")
@@ -16,6 +31,9 @@ scalacOptions += "-Yvirtualize"
1631

1732
//scalacOptions in Compile ++= Seq(/*Unchecked, */Deprecation)
1833

34+
35+
// --- dependencies ---
36+
1937
libraryDependencies += ("org.scala-lang.virtualized" % "scala-library" % virtScala)
2038

2139
// Transitive dependency through scala-continuations-library
@@ -32,19 +50,18 @@ libraryDependencies += ("org.scalatest" % "scalatest_2.11" % "2.2.2").
3250
exclude ("org.scala-lang", "scala-compiler").
3351
exclude ("org.scala-lang", "scala-reflect")
3452

35-
// tests are not thread safe
36-
parallelExecution in Test := false
37-
38-
// disable publishing of main docs
39-
// publishArtifact in (Compile, packageDoc) := false
40-
41-
4253
// continuations
4354
autoCompilerPlugins := true
4455

4556
addCompilerPlugin("org.scala-lang.plugins" % "scala-continuations-plugin_2.11.2" % "1.0.2")
4657

4758
scalacOptions += "-P:continuations:enable"
4859

60+
61+
// --- testing ---
62+
63+
// tests are not thread safe
64+
parallelExecution in Test := false
65+
4966
// code coverage
5067
scoverage.ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := false

publish.sbt

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// maven publishing
1+
// --- maven publishing ---
2+
23
publishMavenStyle := true
34

45
publishArtifact in Test := false
@@ -14,21 +15,11 @@ publishTo := {
1415
Some(repo)
1516
}
1617

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"))
18+
// do not publish docs for snapshot releases
19+
publishArtifact in (Compile, packageDoc) := !version.value.trim.endsWith("SNAPSHOT")
2620

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")))
21+
// `sbt release` should publish signed artifacts
22+
releasePublishArtifactsAction := PgpKeys.publishSigned.value
3223

3324
pomExtra in Global := {
3425
<developers>
@@ -40,6 +31,11 @@ pomExtra in Global := {
4031
</developers>
4132
}
4233

34+
35+
// --- sonatype settings ---
36+
37+
sonatypeProfileName := "org.scala-lang"
38+
4339
credentials ++= (for {
4440
username <- Option(System.getenv().get("SONATYPE_USER"))
4541
password <- Option(System.getenv().get("SONATYPE_PASS"))

0 commit comments

Comments
 (0)