You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# $SCALA_VER_BASE$SCALA_VER_SUFFIX (if former variable is set)
34
-
# By parsing the tag (if HEAD is tagged as v$base$suffix)
35
-
# By parsing build.number for the base version, suffixing with -$sha-nightly
36
-
# Serialize these versions to jenkins.properties, which are passed downstream to scala-release-2.12.x-dist.
37
-
# This also removes the need to tag scala/scala-dist (not possible for nightlies, still encouraged for releases, but not a hard requirement).
38
-
#
39
-
# Determine Module Versions
40
-
#
41
-
# When running in "versions.properties" mode (the default), derive tags from these versions and build, publishing only those modules that are not available yet.
42
-
# Otherwise, build HEAD for all modules, derive a -nightly version for them.
43
-
# Bootstrap:
44
-
#
45
-
# Build minimal core of Scala as this version (aka locker), publish to private-repo
46
-
# Build modules required to bootstrap, publish to private-repo
47
-
# Build Scala using the previously built core and bootstrap modules, publish to private-repo This overwrites the minimal core on private-repo
48
-
# Stage to sonatype (unless building a -nightly release):
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 private-repo
7
+
# - build those modules where a binary compatible version doesn't exist, publish to private-repo
8
+
# - build Scala using the previously built core and bootstrap modules, publish to private-repo (overwrites the minimal core version on private-repo)
9
+
# - for releases (not nightlies)
10
+
# - stage Scala on sonatype
11
+
# - rebuild modules that needed a rebuild with this Scala build, and stage them on sonatype
12
+
# - for nightlies
13
+
# - force rebuild all modules and publish them locally (for testing purposes)
14
+
# - the Scala version is serialized to jenkins.properties, which is passed downstream to scala-release jobs
15
+
# - this removes the need to tag scala/scala-dist (it's still encouraged for releases, but not a hard requirement)
16
+
17
+
18
+
# Specifying the Scala version:
19
+
# - To build a release (this enables publishing to sonatype):
20
+
# - Either specify SCALA_VER_BASE. You may also specify SCALA_VER_SUFFIX, the Scala version is SCALA_VER=$SCALA_VER_BASE$SCALA_VER_SUFFIX.
21
+
# - Or have the current HEAD tagged as v$base$suffix
22
+
# - To prevent staging on sonatype (for testing), set publishToSonatype to anything but "yes"
23
+
# - Note: After building a release, the jenkins job provides an updated versions.properties file as artifact.
24
+
# Put this file in the Scala repo and create a pull request, and also update the file build.number.
25
+
#
26
+
# - Otherwise, a nightly release is built:
27
+
# - version number is read from the build.number file, extended with -$sha-nightly
28
+
29
+
30
+
# Specifying module versions: there are two modes
31
+
# - If moduleVersioning="versions.properties" (default): in this mode we use release versions for the modules.
32
+
# - Module versions are read from the versions.properties file.
33
+
# - Set <MODULE>_VER to override the default, e.g. XML_VER="1.0.4".
34
+
# - The git revision is set to <MODULE>_REF="v$<MODULE>_VER". Make sure the tag exists (you can't override <MODULE>_REF).
49
35
#
50
-
# Stage this Scala build on sonatype
51
-
# Rebuild modules with this Scala build, and stage them on sonatype as well
52
-
# This script can be run in multiple modes. It is design to work without any input,
53
-
# so that it could be run in Travis CI. In that mode, it'll build a release when
54
-
# the current HEAD of the checkout in $WORKSPACE is tagged, and stage to sonatype. Otherwise,
55
-
# it'll build a nightly.
36
+
# - Otherwise (moduleVersioning has some other value): in this mode we use nightly version nubmers for modules.
37
+
# - By default the script sets all <MODULE>_REF to "HEAD", override to build a specific revision.
38
+
# - The <MODULE>_VER is set to a nightly version, for example "1.0.3-7-g14888a2-nightly" (you can't override <MODULE>_VER)
39
+
40
+
41
+
# Modules are automatically built if necessary.
42
+
# - A module is built if it doesn't exist in the maven repository. Note that the lookup uses two versions:
43
+
# - The version of the module (see below how it's determined)
44
+
# - The binary version of of the SCALA_VER release that is being built
45
+
# - sbt computes the binary version when looking up / building modules (*). Examples:
46
+
# - 2.12.0-M1, 2.12.0-RC3: the full version is used
47
+
# - 2.12.0, 2.12.1-M1, 2.12.1-RC3, 2.12.1: the binary version 2.12 is used
56
48
#
57
-
# Since the nightlies are intended to be a drop in replacement, all modules are built with the
58
-
# full Scala version as their binary version, so that you can just set scalaVersion to the
59
-
# nightly's sha-derived version and be good to go.
49
+
# - Example: assume that `scala-xml_2.11 % 1.0.3` and `scala-xml_2.12.0-M1 % 1.0.3` both exists
50
+
# - XML_VER=1.0.3 and SCALA_VER=2.11.7 => no rebuild (binary version remains 2.11)
51
+
# - XML_VER=1.0.3 and SCALA_VER=2.12.0-M2 => rebuild (new binary version 2.12.0-M2)
52
+
# - XML_VER=1.0.4 and SCALA_VER=2.11.7 => rebuild (new version for the module, not yet on maven)
53
+
# NOTE: this is not the recommended way of publishing a module. Instead, prefer to release `scala-xml_2.11 % 1.0.4`
54
+
# using the existing scala 2.11.6 compiler before releasing 2.11.7. Sometimes it's necessary though. One
55
+
# example was 2.11.1, which contained a fix in the backend (SerialVersionUID was ignored). All modules needed
56
+
# to be re-built using the 2.11.1 release, we could not use 2.11.0. We could also not release the modules
57
+
# after 2.11.1 was out, because that way the scala-library-all pom of 2.11.1 would depend on the old modules.
60
58
#
61
-
# The other way to trigger a release is by setting the SCALA_VER_BASE env var.
62
-
#
63
-
# By default, we build the versions of the modules as specified by versions.properties
64
-
# (as specified in the HEAD commit). Set moduleVersioning to something random
65
-
# to trigger building HEAD of each module, generating a fresh -$(git describe)-nightly version for each.
66
-
#
67
-
# PS: set publishToSonatype to anything but "yes" to avoid publishing to sonatype
68
-
# (publishing only done when $WORKSPACE checkout's HEAD is tagged / SCALA_VER_BASE is set.)
0 commit comments