Skip to content

Commit 0541dea

Browse files
committed
IDE validation: run on last commit
1 parent 397dc8d commit 0541dea

File tree

1 file changed

+32
-0
lines changed
  • scripts/jobs/integrate

1 file changed

+32
-0
lines changed

scripts/jobs/integrate/ide

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash -e
2+
# requires checkout: root is a scala checkout with which to integrate (actually, only required file is versions.properties, as documented below)
3+
# requires env: scalaVersion (specifies binary already built from above checkout), WORKSPACE (provided by jenkins), repo_ref (HEAD of the scala checkout),
4+
# requires files: $baseDir/versions.properties (from checkout -- defines version numbers for modules used to build scala for dbuild...)
5+
6+
# TODO: remove when integration is up and running
7+
if [ "woele$_scabot_last" != "woele1" ]; then echo "Scabot didn't mark this as last commit -- skipping."; exit 0; fi
8+
9+
baseDir=${WORKSPACE-`pwd`}
10+
uberBuildUrl=${uberBuildUrl-"https://github.com/scala-ide/uber-build.git"}
11+
uberBuildConfig=${uberBuildConfig-"validator.conf"} # TODO: backport to 2.10.x: uberBuildConfig="validator-2.10.conf"
12+
13+
uberBuildDir="$baseDir/uber-build/"
14+
15+
cd $baseDir
16+
if [[ -d $uberBuildDir ]]; then
17+
( cd $uberBuildDir && git fetch $uberBuildUrl HEAD && git checkout -f FETCH_HEAD && git clean -fxd )
18+
else
19+
git clone $uberBuildUrl
20+
fi
21+
22+
echo "maven.version.number=$scalaVersion" >> versions.properties
23+
24+
# pass prRepoUrl in, which uber-build passes along to dbuild (in sbt-builds-for-ide)
25+
# the "-P pr-scala" maven arg accomplishes the same thing for maven (directly used in uber-build)
26+
BASEDIR="$baseDir" prRepoUrl="$prRepoUrl" MAVEN_ARGS="-P pr-scala"\
27+
$uberBuildDir/uber-build.sh $uberBuildDir/config/$uberBuildConfig $repo_ref $scalaVersion
28+
29+
# uber-build puts its local repo under target/m2repo
30+
# wipe the org/scala-lang part, which otherwise just keeps
31+
# growing and growing due to the -$sha-SNAPSHOT approach
32+
[[ -d $baseDir/target/m2repo/org/scala-lang ]] && rm -rf $baseDir/target/m2repo/org/scala-lang

0 commit comments

Comments
 (0)