@@ -4,29 +4,64 @@ baseDir=${WORKSPACE-`pwd`}
4
4
scriptsDir=" $baseDir /scripts"
5
5
. $scriptsDir /common
6
6
7
+ cd $baseDir
8
+
7
9
function containsCommit(){
8
10
local mb=$( git merge-base $1 HEAD 2> /dev/null)
9
11
[[ $1 != " " && $mb == $1 ]]
10
12
}
11
13
14
+ rNewVersionFormat212=867ba960d1dbfa35a8e8dd45de1ac96b435598c3
15
+ rNewVersionFormat211=not-yet-backported
16
+ function fNewVersionFormat(){
17
+ source $scriptsDir /jobs/integrate/bootstrap
18
+ }
19
+
20
+ function setNewScalaVersionStyle(){
21
+ publishToSonatype=" no"
22
+
23
+ # change to use `generateBuildCharacterPropertiesFile` to get the scala version
24
+ local useBuildCharacter=e2b6c7b608b82fca5343f6d09236c2b48b5d824d
25
+ if containsCommit $useBuildCharacter ; then
26
+ $SBT_CMD ' set baseVersionSuffix in Global := "UNUSED-SUFFIX"' generateBuildCharacterPropertiesFile
27
+ parseScalaProperties " buildcharacter.properties"
28
+ SCALA_VER_BASE=$maven_version_base
29
+ else
30
+ parseScalaProperties " build.number"
31
+ SCALA_VER_BASE=" $version_major .$version_minor .$version_patch "
32
+ fi
33
+
34
+ local shaSuffix=$( $baseDir /tools/get-scala-commit-sha | cut -c1-7)
35
+ local cross=" bin"
36
+ if [[ $SCALA_VER_BASE =~ ^.* \. 0$ ]]; then
37
+ cross=" pre"
38
+ fi
39
+ SCALA_VER_SUFFIX=" -$cross -$shaSuffix "
40
+ }
41
+
12
42
# - changed default repo from "scala-release-temp" to "scala-integration"
13
43
# - renamed $releaseTempRepoUrl to $integrationRepoUrl
14
44
rIntegrationRepo212=02af0b53e860786b19cd5f67acd0bc0773a2be0d
15
45
rIntegrationRepo211=not-yet-backported
16
46
function fIntegrationRepo(){
47
+ setNewScalaVersionStyle
17
48
source $scriptsDir /jobs/integrate/bootstrap
18
49
}
19
50
20
51
# - introducded the $releaseTempRepoUrl variable
21
52
rReleaseTempVarName=706d68f863ebffb0f63811afe0835c5f975ba225
22
53
function fReleaseTempVarName(){
54
+ setNewScalaVersionStyle
23
55
releaseTempRepoUrl=" https://scala-ci.typesafe.com/artifactory/scala-integration/"
24
56
source $scriptsDir /jobs/integrate/bootstrap
25
57
}
26
58
27
59
# TODO: support older revisions
28
60
29
61
# main
62
+ if containsCommit $rNewVersionFormat212 || containsCommit $rNewVersionFormat211 ; then
63
+ fNewVersionFormat
64
+
30
65
if containsCommit $rIntegrationRepo212 || containsCommit $rIntegrationRepo211 ; then
31
66
fIntegrationRepo
32
67
0 commit comments