|
1 | 1 | #!/bin/bash -e
|
2 | 2 |
|
3 |
| -# Script Overview |
4 |
| -# - determine scala version |
5 |
| -# - determine module versions |
6 |
| -# - build minimal core (aka locker) of Scala, use the determined version number, publish to scala-integration |
7 |
| -# - build those modules where a binary compatible version doesn't exist, publish to scala-integration |
8 |
| -# - build Scala using the previously built core and bootstrap modules, publish to scala-integration |
9 |
| -# - for releases |
10 |
| -# - stage Scala on sonatype |
11 |
| -# - rebuild modules that needed a rebuild with this Scala build, and stage them on sonatype |
12 |
| -# - the Scala version is serialized to jenkins.properties, which is passed downstream to scala-release jobs |
13 |
| - |
14 |
| - |
15 |
| -# Specifying the Scala version: |
16 |
| -# - To build a release (this enables publishing to sonatype): |
17 |
| -# - Specify SCALA_VER_BASE. You may also specify SCALA_VER_SUFFIX, the Scala version is SCALA_VER=$SCALA_VER_BASE$SCALA_VER_SUFFIX. |
18 |
| -# - Note: After building a release, the jenkins job provides an updated versions.properties file as artifact. |
19 |
| -# Put this file in the Scala repo and create a pull request, also update `baseVersion in Global` in build.sbt. |
20 |
| -# |
21 |
| -# - Otherwise, an integration build is performed: |
22 |
| -# - version number is read from the build.sbt, extended with -[bin|pre]-$sha |
23 |
| - |
24 |
| - |
25 |
| -# Specifying module versions. We use release versions for modules. |
26 |
| -# - Module versions are read from the versions.properties file. |
27 |
| -# - Set <MODULE>_VER to override the default, e.g. XML_VER="1.0.4". |
28 |
| -# - The git revision is set to <MODULE>_REF="v$<MODULE>_VER". Make sure the tag exists (you can't override <MODULE>_REF). |
29 |
| - |
30 |
| - |
31 |
| -# Modules are automatically built if necessary. |
32 |
| -# - A module is built if it doesn't exist in the maven repository. Note that the lookup uses two versions: |
33 |
| -# - The version of the module (see below how it's determined) |
34 |
| -# - The binary version of of the SCALA_VER release that is being built |
35 |
| -# - sbt computes the binary version when looking up / building modules (*). Examples: |
36 |
| -# - 2.12.0-M1, 2.12.0-RC3: the full version is used |
37 |
| -# - 2.12.0, 2.12.1-M1, 2.12.1-RC3, 2.12.1: the binary version 2.12 is used |
38 |
| -# |
39 |
| -# - Example: assume that `scala-xml_2.11 % 1.0.3` and `scala-xml_2.12.0-M1 % 1.0.3` both exists |
40 |
| -# - XML_VER=1.0.3 and SCALA_VER=2.11.7 => no rebuild (binary version remains 2.11) |
41 |
| -# - XML_VER=1.0.3 and SCALA_VER=2.12.0-M2 => rebuild (new binary version 2.12.0-M2) |
42 |
| -# - XML_VER=1.0.4 and SCALA_VER=2.11.7 => rebuild (new version for the module, not yet on maven) |
43 |
| -# NOTE: this is not the recommended way of publishing a module. Instead, prefer to release `scala-xml_2.11 % 1.0.4` |
44 |
| -# using the existing scala 2.11.6 compiler before releasing 2.11.7. Sometimes it's necessary though. One |
45 |
| -# example was 2.11.1, which contained a fix in the backend (SerialVersionUID was ignored). All modules needed |
46 |
| -# to be re-built using the 2.11.1 release, we could not use 2.11.0. We could also not release the modules |
47 |
| -# after 2.11.1 was out, because that way the scala-library-all pom of 2.11.1 would depend on the old modules. |
48 |
| -# |
49 |
| -# (*) https://github.com/sbt/sbt/blob/v0.13.13/util/cross/src/main/input_sources/CrossVersionUtil.scala#L41 |
50 |
| - |
51 |
| - |
52 |
| -# Binary incompatible changes in Modules: example with Scala 2.11 / 2.12 and scala-parser-combinators |
53 |
| -# - The 1.0.x branch on scala-parser-combinators remains binary compatible with 1.0.0 |
54 |
| -# - Scala 2.11 will always use 1.0.x releases: we ship scala-parser-combinators with the distribution, |
55 |
| -# so we cannot introduce incompatible changes in a minor release. |
56 |
| -# - The master branch of scala-parser-combinators contains binary incompatible changes, versioned 1.1.x |
57 |
| -# - Scala 2.12 will use 1.1.x releases |
58 |
| -# - No changes to the build script required: just put the 1.1.x version number into versions.properties |
59 |
| -# |
60 |
| -# Note: It's still OK for a module to release a binary incompatible version to maven, for example |
61 |
| -# scala-parser-combinators_2.11 % 1.1.0. Users can depend on this in their sbt build. But for the |
62 |
| -# distribution (tar/zip archives, scala-library-all) we have to stay on the binary compatible version. |
63 |
| - |
64 |
| - |
65 |
| -# Requirements |
66 |
| -# - SBT_CMD must point to sbt from sbt-extras |
67 |
| -# - ~/.sonatype-curl, ~/.m2/settings.xml, ~/.credentials, ~/.credentials-sonatype, ~/.credentials-private-repo |
68 |
| -# as defined by https://github.com/scala/scala-jenkins-infra/tree/master/templates/default |
69 |
| -# - ~/.sbt/0.13/plugins/gpg.sbt with: |
70 |
| -# addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1") |
71 |
| - |
72 |
| -# Note: private-repo used to be private-repo.typesafe.com. now we're running artifactory on scala-ci.typesafe.com/artifactory |
73 |
| - |
74 |
| -#### MAIN |
| 3 | +# See comment in bootstrap_fun |
75 | 4 |
|
76 | 5 | source scripts/common
|
77 | 6 |
|
|
0 commit comments