Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 60 lines (49 sloc) 1.997 kB
367acb3 @adriaanm Speed up PR validation by publishing locker to maven from the start.
adriaanm authored
1 #!/bin/bash -ex
2 # PRE:
3 # - vars: sha
717cbb2 @retronym Disable IDE valiation on the 2.12.x branch.
retronym authored
4 # - artifacts: versions.properties (parsed for maven_version_number, version_minor)
367acb3 @adriaanm Speed up PR validation by publishing locker to maven from the start.
adriaanm authored
5 # - on pr maven repo: Scala version $maven_version_number
6
7 scriptsDir="$( cd "$( dirname "$0" )/.." && pwd )"
8 . $scriptsDir/common
9 . $scriptsDir/pr-scala-common
10 parse_properties versions.properties
28bf34e @adriaanm test integration with ide and partest for scala pr validation
adriaanm authored
11
717cbb2 @retronym Disable IDE valiation on the 2.12.x branch.
retronym authored
12 if [ "$version_minor" = "12" ]
13 then echo "Not integrating with Scala 2.$version_minor."; exit 0
14 else echo "Integrating with Scala 2.$version_minor"
15 fi
16
ffa3604 @adriaanm Replace obsolete pr-scala-integrate-ide by pr-scala-integrate-ide-uni…
adriaanm authored
17 BASEDIR=`pwd`
a5f96c0 @adriaanm Back to standard uber-build!
adriaanm authored
18 UBERBUILD_URL="https://github.com/scala-ide/uber-build.git"
ffa3604 @adriaanm Replace obsolete pr-scala-integrate-ide by pr-scala-integrate-ide-uni…
adriaanm authored
19 UBERBUILD_DIR="$BASEDIR/uber-build/"
28bf34e @adriaanm test integration with ide and partest for scala pr validation
adriaanm authored
20
21 cd $BASEDIR
22
23 #####################################################
24 # Clone repos
25 #####################################################
26
ffa3604 @adriaanm Replace obsolete pr-scala-integrate-ide by pr-scala-integrate-ide-uni…
adriaanm authored
27 if [[ -d $UBERBUILD_DIR ]]; then
28 ( cd $UBERBUILD_DIR && git fetch $UBERBUILD_URL HEAD && git checkout -f FETCH_HEAD && git clean -fxd )
29 else
30 git clone $UBERBUILD_URL
31 fi
28bf34e @adriaanm test integration with ide and partest for scala pr validation
adriaanm authored
32
97722ca @gkossakowski Use Scala 2.10 specific config file for building IDE
gkossakowski authored
33 if [ "$version_minor" = "10" ]
34 then echo "Using Scala 2.10-specific config file."; CONFIG_FILE_NAME="validator-2.10.conf"
35 else echo "Using default config file."; CONFIG_FILE_NAME="validator.conf"
36 fi
37
367acb3 @adriaanm Speed up PR validation by publishing locker to maven from the start.
adriaanm authored
38 # pass prRepoUrl in, which uber-build passes along to dbuild (in sbt-builds-for-ide)
39 # the "-P pr-scala" maven arg accomplishes the same thing for maven (directly used in uber-build)
40 prRepoUrl="$prRepoUrl"\
41 MAVEN_ARGS="-P pr-scala"\
97722ca @gkossakowski Use Scala 2.10 specific config file for building IDE
gkossakowski authored
42 $UBERBUILD_DIR/uber-build.sh $UBERBUILD_DIR/config/$CONFIG_FILE_NAME $sha $maven_version_number
367acb3 @adriaanm Speed up PR validation by publishing locker to maven from the start.
adriaanm authored
43
4a9fde3 @adriaanm Wipe org/scala-lang part of m2repo.
adriaanm authored
44 # uber-build puts its local repo under target/m2repo
45 # wipe the org/scala-lang part, which otherwise just keeps
46 # growing and growing due to the -$sha-SNAPSHOT approach
47 [[ -d $WORKSPACE/target/m2repo/org/scala-lang ]] && rm -rf $WORKSPACE/target/m2repo/org/scala-lang
367acb3 @adriaanm Speed up PR validation by publishing locker to maven from the start.
adriaanm authored
48
49 # this assumes ~/.m2/settings.xml contains
50 # <profile>
51 # <id>pr-scala</id>
52 # <repositories>
53 # <repository>
54 # <id>pr-snapshots</id>
55 # <name>Scala PR validation snapshots</name>
56 # <url>$prRepoUrl</url>
57 # </repository>
58 # </repositories>
a5f96c0 @adriaanm Back to standard uber-build!
adriaanm authored
59 # </profile>
Something went wrong with that request. Please try again.