1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/bash -e
# This script publishes the core of Scala to maven for use as locker downstream,
# and saves the relevant properties used in its build artifacts, versions.properties.
# (This means we'll use locker instead of quick downstream in dbuild.
# The only downside is that backend improvements don't improve compiler performance itself until they are in STARR).
# The version is suffixed with "-${sha:0:7}-SNAPSHOT"
baseDir=${WORKSPACE-`pwd`}
scriptsDir="$baseDir/scripts"
. $scriptsDir/common
case $prDryRun in
yep)
echo "DRY RUN"
mkdir -p build/pack ; mkdir -p dists/maven/latest
;;
*)
echo ">>> Getting Scala version number."
$SBT_CMD --warn "setupPublishCore $prRepoUrl" generateBuildCharacterPropertiesFile
parseScalaProperties buildcharacter.properties # produce maven_version_number
echo ">>> Checking availability of Scala ${maven_version_number} in $prRepoUrl."
checkAvailability "org.scala-lang" "scala-library" "${maven_version_number}" $prRepoUrl; libraryAvailable=$RES
checkAvailability "org.scala-lang" "scala-reflect" "${maven_version_number}" $prRepoUrl; reflectAvailable=$RES
checkAvailability "org.scala-lang" "scala-compiler" "${maven_version_number}" $prRepoUrl; compilerAvailable=$RES
if $libraryAvailable && $reflectAvailable && $compilerAvailable; then
echo "Scala core already built!"
else
$SBT_CMD --warn "setupPublishCore $prRepoUrl" publish
fi
mv buildcharacter.properties jenkins.properties # parsed by the jenkins job
;;
esac
|