@@ -77,13 +77,14 @@ publishSonatypeTaskCore=${publishSonatypeTaskCore-"publishSigned"}
77
77
publishSonatypeTaskModules=${publishSonatypeTaskModules-" publishSigned" }
78
78
79
79
forceRebuild=${forceRebuild-no}
80
-
81
80
sbtBuildTask=${sbtBuildTask-" testAll" } # TESTING leave empty to avoid the sanity check
82
81
testStability=${testStability-yes}
83
82
84
83
clean=" clean" # TESTING leave empty to speed up testing
85
84
86
- baseDir=${WORKSPACE-`pwd`}
85
+ WORKSPACE=${WORKSPACE-`pwd`}
86
+ baseDir=${WORKSPACE}
87
+
87
88
scriptsDir=" $baseDir /scripts"
88
89
. $scriptsDir /common
89
90
@@ -99,7 +100,9 @@ mkdir -p $baseDir/resolutionScratch_
99
100
# repo to publish builds
100
101
integrationRepoUrl=${integrationRepoUrl-" https://scala-ci.typesafe.com/artifactory/scala-integration/" }
101
102
102
- generateRepositoriesConfig $integrationRepoUrl
103
+ if [ " ${TRAVIS} " != " true" ]; then
104
+ generateRepositoriesConfig $integrationRepoUrl
105
+ fi
103
106
104
107
# ARGH trying to get this to work on multiple versions of sbt-extras...
105
108
# the old version (on jenkins, and I don't want to upgrade for risk of breaking other builds) honors -sbt-dir
@@ -152,19 +155,22 @@ function st_stagingRepoClose() {
152
155
# ### sbt tools
153
156
154
157
sbtBuild () {
155
- echo " ### sbtBuild: " $SBT_CMD -no-colors $sbtArgs " ${scalaVersionTasks[@]} " " ${publishTasks[@]} " " $@ "
156
- $SBT_CMD -no-colors $sbtArgs " ${scalaVersionTasks[@]} " " ${publishTasks[@]} " " $@ " >> $baseDir /logs/builds 2>&1
158
+ travis_fold_start build " Building $( basename $PWD ) with $@ "
159
+ $SBT_CMD -no-colors $sbtArgs " ${scalaVersionTasks[@]} " " ${publishTasks[@]} " " $@ "
160
+ travis_fold_end build
157
161
}
158
162
159
163
sbtResolve () {
160
164
cd $baseDir /resolutionScratch_
161
165
touch build.sbt
162
166
# Can be set to `full` if a module requires cross-versioning against the full Scala version, like the continuations plugin used to.
163
167
cross=${4-binary}
164
- echo " ### sbtResolve: $SBT_CMD -no-colors $sbtArgs " " ${scalaVersionTasks[@]} " " \" $1 \" % \" $2 \" % \" $3 \" cross CrossVersion.$cross "
168
+ # echo "### sbtResolve: $SBT_CMD -no-colors $sbtArgs " "${scalaVersionTasks[@]}" "\"$1\" % \"$2\" % \"$3\" cross CrossVersion.$cross"
169
+ travis_fold_start resolve " Resolving \" $1 \" % \" $2 \" % \" $3 \" cross CrossVersion.$cross "
165
170
$SBT_CMD -no-colors $sbtArgs " ${scalaVersionTasks[@]} " \
166
171
" set libraryDependencies := Seq(\" $1 \" % \" $2 \" % \" $3 \" cross CrossVersion.$cross )" \
167
- ' show update' >> $baseDir /logs/resolution 2>&1
172
+ ' show update'
173
+ travis_fold_end resolve
168
174
}
169
175
170
176
# Oh boy... can't use scaladoc to document scala-xml if scaladoc depends on the same version of scala-xml.
@@ -229,15 +235,15 @@ buildScalaCheck(){
229
235
230
236
# build modules, using ${buildTasks[@]} (except for ScalaCheck, which is hard-coded to publish to artifactory)
231
237
buildModules () {
232
- publishTasks=(' set credentials += Credentials(Path.userHome / ".credentials-private-repo" )' " set every publishTo := Some(\" publish-repo\" at \" $integrationRepoUrl \" )" )
238
+ publishTasks=(' set credentials += Credentials("Artifactory Realm", "scala-ci.typesafe.com", "scala-ci", System.getenv("PRIVATE_REPO_PASS") )' " set every publishTo := Some(\" publish-repo\" at \" $integrationRepoUrl \" )" )
233
239
buildTasks=($publishPrivateTask )
234
240
buildXML
235
241
# buildScalaCheck
236
242
buildPartest
237
243
}
238
244
239
245
buildPublishedModules () {
240
- publishTasks=(' set credentials += Credentials(Path.userHome / ".credentials- sonatype" )' " set pgpPassphrase := Some(Array.empty)" )
246
+ publishTasks=(' set credentials += Credentials("Sonatype Nexus Repository Manager", "oss. sonatype.org", System.getenv("SONA_USER"), System.getenv("SONA_PASS") )' " set pgpPassphrase := Some(Array.empty)" )
241
247
buildTasks=($publishSonatypeTaskModules )
242
248
buildXML
243
249
buildPartest
@@ -283,7 +289,9 @@ determineScalaVersion() {
283
289
if [ -z " $SCALA_VER_BASE " ]; then
284
290
echo " No SCALA_VER_BASE specified."
285
291
292
+ travis_fold_start determineScalaVersion " Determining Scala version"
286
293
$SBT_CMD $sbtArgs ' set baseVersionSuffix in Global := "SHA"' generateBuildCharacterPropertiesFile
294
+ travis_fold_end determineScalaVersion
287
295
parseScalaProperties " buildcharacter.properties"
288
296
SCALA_VER_BASE=" $maven_version_base "
289
297
SCALA_VER_SUFFIX=" $maven_version_suffix "
@@ -376,8 +384,6 @@ bootstrap() {
376
384
377
385
# ### (Optional) STARR.
378
386
if [ ! -z " $STARR_REF " ]; then
379
- echo " ### Building STARR"
380
-
381
387
STARR_DIR=./scala-starr
382
388
STARR_VER_SUFFIX=" -$( git rev-parse --short $STARR_REF ) -starr"
383
389
STARR_VER=$SCALA_VER_BASE$STARR_VER_SUFFIX
@@ -386,21 +392,24 @@ bootstrap() {
386
392
git clone --reference $WORKSPACE /.git $WORKSPACE /.git $STARR_DIR
387
393
cd $STARR_DIR
388
394
git co $STARR_REF
389
- $SBT_CMD -no-colors $sbtArgs --warn " setupBootstrapStarr $integrationRepoUrl $STARR_VER " $clean publish >> $baseDir /logs/builds 2>&1
395
+ travis_fold_start starr " Building starr"
396
+ $SBT_CMD -no-colors $sbtArgs --warn " setupBootstrapStarr $integrationRepoUrl $STARR_VER " $clean publish
397
+ travis_fold_end starr
390
398
)
391
399
fi
392
400
393
401
# ### LOCKER
394
402
395
- echo " ### Building locker"
396
-
397
403
# for bootstrapping, publish core (or at least smallest subset we can get away with)
398
404
# so that we can build modules with this version of Scala and publish them locally
399
405
# must publish under $SCALA_VER so that the modules will depend on this (binary) version of Scala
400
406
# publish more than just core: partest needs scalap
401
407
# in sabbus lingo, the resulting Scala build will be used as starr to build the released Scala compiler
402
408
if [ ! -z " $STARR_VER " ]; then SET_STARR=-Dstarr.version=$STARR_VER ; fi
403
- $SBT_CMD -no-colors $sbtArgs $SET_STARR --warn " setupBootstrapLocker $integrationRepoUrl $SCALA_VER " $clean publish >> $baseDir /logs/builds 2>&1
409
+
410
+ travis_fold_start locker " Building locker"
411
+ $SBT_CMD -no-colors $sbtArgs $SET_STARR --warn " setupBootstrapLocker $integrationRepoUrl $SCALA_VER " $clean publish
412
+ travis_fold_end locker
404
413
405
414
echo " ### Building modules using locker"
406
415
@@ -425,6 +434,7 @@ bootstrap() {
425
434
cd $baseDir
426
435
rm -rf build/
427
436
437
+ travis_fold_start quick " Building bootstrapped"
428
438
$SBT_CMD $sbtArgs \
429
439
--warn \
430
440
-Dstarr.version=$SCALA_VER \
@@ -434,6 +444,7 @@ bootstrap() {
434
444
$sbtBuildTask \
435
445
dist/mkQuick \
436
446
publish
447
+ travis_fold_end quick
437
448
438
449
# clear ivy cache (and to be sure, local as well), so the next round of sbt builds sees the fresh scala
439
450
rm -rf $baseDir /ivy2
@@ -443,8 +454,7 @@ bootstrap() {
443
454
}
444
455
445
456
testStability () {
446
- echo " ### Testing stability"
447
-
457
+ travis_fold_start stab " Testing stability"
448
458
cd $baseDir
449
459
450
460
# Run stability tests using the just built version as "quick" and a new version as "strap"
@@ -460,6 +470,8 @@ testStability() {
460
470
mv build/quick build/strap
461
471
mv quick1 build/quick
462
472
$scriptsDir /stability-test.sh
473
+
474
+ travis_fold_end stab
463
475
}
464
476
465
477
# assumes we just bootstrapped, and current directory is $baseDir
@@ -469,15 +481,16 @@ testStability() {
469
481
publishSonatype () {
470
482
# stage to sonatype, along with all modules -Dmaven.version.suffix/-Dbuild.release not necessary,
471
483
# since we're just publishing an existing build
472
- echo " ### Publishing core to sonatype"
484
+ travis_fold_start sona " Publishing core to sonatype"
473
485
$SBT_CMD $sbtArgs \
474
486
--warn \
475
487
-Dstarr.version=$SCALA_VER \
476
488
${updatedModuleVersions[@]} \
477
489
" setupBootstrapPublish $integrationRepoUrl $SCALA_VER " \
478
490
$publishSonatypeTaskCore
491
+ travis_fold_end sona
479
492
480
- echo " ### Publishing modules to sonatype"
493
+ # echo "### Publishing modules to sonatype"
481
494
# build/test/publish scala core modules to sonatype (this will start a new staging repo)
482
495
# (was hoping we could make everything go to the same staging repo, but it's not timing that causes two staging repos to be opened)
483
496
# NOTE: only publish those for which versions are set
0 commit comments