2
# This script publishes the core of Scala to maven for use as locker downstream,
3
# and saves the relevant properties used in its build artifacts, versions.properties.
4
# (This means we'll use locker instead of quick downstream in dbuild.
5
# The only downside is that backend improvements don't improve compiler performance itself until they are in STARR).
6
# The version is suffixed with "-${sha:0:7}-SNAPSHOT"
8
baseDir=${WORKSPACE-`pwd`}
9
scriptsDir="$baseDir/scripts"
15
mkdir -p build/pack ; mkdir -p dists/maven/latest
18
sha=$(git rev-parse HEAD) # TODO: warn if $repo_ref != $sha (we shouldn't do PR validation using symbolic gitrefs)
19
echo "sha/repo_ref == $sha/$repo_ref ?"
21
parseScalaProperties build.number
24
# "noyoudont" is there juuuust in case
25
antDeployArgs="-Dmaven.version.suffix=\"-${sha:0:7}-SNAPSHOT\" -Dremote.snapshot.repository=$prRepoUrl -Drepository.credentials.id=pr-scala -Dremote.release.repository=noyoudont"
27
# master doesn't currently build with starr, so can't skip locker yet...
28
# TODO: enable for 2.11 once we have bumped versions in versions.properties accordingly
29
antBuildArgs="-Dlocker.skip=1" # -Dstarr.use.released=1 should be left up to the build (via versions.properties)
31
# TODO: can we move doc generation downstream as well?
32
# build to (later) publish with a maven suffix that encodes the first 7 characters of the sha of the commit that we're validating
33
# (don't use the sha of the merge commit as we don't have an easy way of passing that down the validation chain)
34
ant -Darchives.skipxz=true $antDeployArgs $antBuildArgs distpack-maven-opt
36
# mv buildcharacter.properties jenkins.properties # parsed by the jenkins job
37
echo "maven.version.number=$version_major.$version_minor.$version_patch-${sha:0:7}-SNAPSHOT" > jenkins.properties
40
ant $antDeployArgs deploy-core.snapshot