File tree Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ before_install:
99
1010env :
1111 global :
12- - PUBLISH_JDK=openjdk6
1312 # PGP_PASSPHRASE
1413 - secure : " SkBtn/6OjEldoikn0MFuyeLT/pau27kwKSDYTVQeJ4BKDzdWLwLE5Q3RukLGttIfNdhOvRoocpQSW9GkZfibTHmwrRnAokucfZCqTsKbwoOp1xIoOh5GrrVrB6gcP7WBTKinqFdBgSvLOrP7GviImz4ZuB9wq1r+mToGG4pDrXc="
1514 # SONA_USER
@@ -21,7 +20,6 @@ script: admin/build.sh
2120
2221jdk :
2322 - openjdk6
24- - openjdk7
2523 - oraclejdk8
2624
2725notifications :
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ To configure tag driven releases from Travis CI.
1919 Edit ` .travis.yml ` as prompted.
2020 4 . Edit ` .travis.yml ` to use ` ./admin/build.sh ` as the build script,
2121 and edit that script to use the tasks required for this project.
22- 5 . Edit ` .travis.yml ` to select which JDK will be used for publishing.
22+ 5 . Edit ` build.sbt ` to select which JDK will be used for publishing.
2323
2424It is important to add comments in .travis.yml to identify the name
2525of each environment variable encoded in a ` :secure ` section.
3030 language: scala
3131 env:
3232 global:
33- - PUBLISH_JDK=openjdk6
3433 # PGP_PASSPHRASE
3534 - secure: "XXXXXX"
3635 # SONA_USER
Original file line number Diff line number Diff line change 77# git on travis does not fetch tags, but we have TRAVIS_TAG
88# headTag=$(git describe --exact-match ||:)
99
10- if [ " $TRAVIS_JDK_VERSION " == " $PUBLISH_JDK " ] && [ [ " $TRAVIS_TAG " =~ ^v[0-9]+\. [0-9]+\. [0-9]+ (-[A-Za-z0-9-]+)? ]]; then
10+ if [[ " $TRAVIS_TAG " =~ ^v[0-9]+\. [0-9]+\. [0-9]+ (-[A-Za-z0-9-]+)? ]]; then
1111 echo " Going to release from tag $TRAVIS_TAG !"
1212 myVer=$( echo $TRAVIS_TAG | sed -e s/^v//)
1313 publishVersion=' set every version := "' $myVer ' "'
Original file line number Diff line number Diff line change 11scalaVersion in ThisBuild := crossScalaVersions.value.head
22
33crossScalaVersions in ThisBuild := {
4+ val v211 = List (" 2.11.8" )
5+ val v212 = List (" 2.12.0-RC1" )
6+
47 val javaVersion = System .getProperty(" java.version" )
5- val isJDK6Or7 =
6- javaVersion.startsWith(" 1.6." ) || javaVersion.startsWith(" 1.7." )
7- if (isJDK6Or7)
8- Seq (" 2.11.8" )
9- else
10- Seq (" 2.11.8" , " 2.12.0-RC1" )
8+ val isTravisPublishing = ! util.Properties .envOrElse(" TRAVIS_TAG" , " " ).trim.isEmpty
9+
10+ if (isTravisPublishing) {
11+ if (javaVersion.startsWith(" 1.6." )) v211
12+ else if (javaVersion.startsWith(" 1.8." )) v212
13+ else Nil
14+ } else if (javaVersion.startsWith(" 1.6." ) || javaVersion.startsWith(" 1.7." )) {
15+ v211
16+ } else if (javaVersion.startsWith(" 1.8." ) || javaVersion.startsWith(" 9" )) {
17+ v211 ++ v212
18+ } else {
19+ sys.error(s " Unsupported java version: $javaVersion. " )
20+ }
1121}
1222
1323lazy val `scala-parser-combinators` = crossProject.in(file(" ." )).
You can’t perform that action at this time.
0 commit comments