Skip to content

Commit 39dd442

Browse files
committed
set new scala version style for older revisions
1 parent 1ab5d00 commit 39dd442

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

externalScripts/jobs/integrate/bootstrap

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,64 @@ baseDir=${WORKSPACE-`pwd`}
44
scriptsDir="$baseDir/scripts"
55
. $scriptsDir/common
66

7+
cd $baseDir
8+
79
function containsCommit(){
810
local mb=$(git merge-base $1 HEAD 2> /dev/null)
911
[[ $1 != "" && $mb == $1 ]]
1012
}
1113

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+
1242
# - changed default repo from "scala-release-temp" to "scala-integration"
1343
# - renamed $releaseTempRepoUrl to $integrationRepoUrl
1444
rIntegrationRepo212=02af0b53e860786b19cd5f67acd0bc0773a2be0d
1545
rIntegrationRepo211=not-yet-backported
1646
function fIntegrationRepo(){
47+
setNewScalaVersionStyle
1748
source $scriptsDir/jobs/integrate/bootstrap
1849
}
1950

2051
# - introducded the $releaseTempRepoUrl variable
2152
rReleaseTempVarName=706d68f863ebffb0f63811afe0835c5f975ba225
2253
function fReleaseTempVarName(){
54+
setNewScalaVersionStyle
2355
releaseTempRepoUrl="https://scala-ci.typesafe.com/artifactory/scala-integration/"
2456
source $scriptsDir/jobs/integrate/bootstrap
2557
}
2658

2759
# TODO: support older revisions
2860

2961
# main
62+
if containsCommit $rNewVersionFormat212 || containsCommit $rNewVersionFormat211; then
63+
fNewVersionFormat
64+
3065
if containsCommit $rIntegrationRepo212 || containsCommit $rIntegrationRepo211; then
3166
fIntegrationRepo
3267

0 commit comments

Comments
 (0)