2017-02-27 16:15:15 +01:00
|
|
|
#!/usr/bin/env bash
|
2018-09-28 17:55:42 +02:00
|
|
|
set -euvx
|
2015-06-16 20:17:07 +02:00
|
|
|
|
2018-11-20 10:31:34 +01:00
|
|
|
lmCoursier() {
|
|
|
|
|
[ "${LM_COURSIER:-""}" = 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 18:31:16 +02:00
|
|
|
sbtPgpCoursier() {
|
|
|
|
|
[ "${SBT_PGP_COURSIER:-""}" = 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
2017-05-04 15:25:49 +02:00
|
|
|
sbtShading() {
|
2018-09-28 17:55:42 +02:00
|
|
|
[ "${SBT_SHADING:-""}" = 1 ]
|
2017-05-04 15:25:49 +02:00
|
|
|
}
|
|
|
|
|
|
2018-11-20 10:31:34 +01:00
|
|
|
runLmCoursierTests() {
|
2019-06-19 17:13:44 +02:00
|
|
|
if [ "$TEST_GROUP" = 1 ]; then
|
|
|
|
|
SCRIPTED_EXTRA="sbt-lm-coursier/*"
|
|
|
|
|
else
|
|
|
|
|
SCRIPTED_EXTRA=""
|
|
|
|
|
fi
|
|
|
|
|
|
2019-04-24 18:20:32 +02:00
|
|
|
# publishing locally to ensure shading runs fine
|
2018-11-20 11:48:19 +01:00
|
|
|
./metadata/scripts/with-test-repo.sh sbt \
|
2019-05-22 21:19:46 +02:00
|
|
|
++$TRAVIS_SCALA_VERSION! \
|
|
|
|
|
mimaReportBinaryIssues \
|
2019-04-24 18:20:32 +02:00
|
|
|
lm-coursier-shaded/publishLocal \
|
2018-11-20 11:48:19 +01:00
|
|
|
lm-coursier/test \
|
2019-06-19 17:13:44 +02:00
|
|
|
"sbt-lm-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
|
2018-11-20 10:31:34 +01:00
|
|
|
}
|
|
|
|
|
|
2017-02-27 16:15:15 +01:00
|
|
|
runSbtCoursierTests() {
|
2018-11-22 14:23:50 +01:00
|
|
|
if [ "$TEST_GROUP" = 1 ]; then
|
|
|
|
|
SCRIPTED_EXTRA="sbt-coursier/*"
|
|
|
|
|
else
|
|
|
|
|
SCRIPTED_EXTRA=""
|
|
|
|
|
fi
|
|
|
|
|
|
2018-11-20 10:31:34 +01:00
|
|
|
./metadata/scripts/with-test-repo.sh sbt \
|
|
|
|
|
++$TRAVIS_SCALA_VERSION \
|
2018-11-20 17:17:53 +01:00
|
|
|
sbt-coursier-shared/test \
|
2018-11-22 14:23:50 +01:00
|
|
|
"sbt-coursier/scripted shared-$TEST_GROUP/* $SCRIPTED_EXTRA"
|
2017-02-27 16:15:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
runSbtShadingTests() {
|
2018-09-28 17:55:42 +02:00
|
|
|
sbt ++$TRAVIS_SCALA_VERSION sbt-shading/scripted
|
2017-07-08 14:18:03 +02:00
|
|
|
}
|
|
|
|
|
|
2018-09-28 18:31:16 +02:00
|
|
|
runSbtPgpCoursierTests() {
|
|
|
|
|
addPgpKeys
|
2019-05-27 14:50:33 +02:00
|
|
|
sbt ++$TRAVIS_SCALA_VERSION sbt-pgp-coursier/compile
|
|
|
|
|
# disable for now, sbt ++$TRAVIS_SCALA_VERSION sbt-pgp-coursier/scripted
|
|
|
|
|
# fails with "unknown signature key algorithm: 22"
|
|
|
|
|
# and "No signatures found"
|
2018-09-28 18:31:16 +02:00
|
|
|
}
|
|
|
|
|
|
2017-06-06 19:51:38 +02:00
|
|
|
addPgpKeys() {
|
|
|
|
|
for key in b41f2bce 9fa47a44 ae548ced b4493b94 53a97466 36ee59d9 dc426429 3b80305d 69e0a56c fdd5c0cd 35543c27 70173ee5 111557de 39c263a9; do
|
|
|
|
|
gpg --keyserver keyserver.ubuntu.com --recv "$key"
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-27 16:15:15 +01:00
|
|
|
|
2018-09-28 17:55:42 +02:00
|
|
|
if sbtShading; then
|
|
|
|
|
runSbtShadingTests
|
2018-09-28 18:31:16 +02:00
|
|
|
elif sbtPgpCoursier; then
|
|
|
|
|
runSbtPgpCoursierTests
|
2018-11-20 10:31:34 +01:00
|
|
|
elif lmCoursier; then
|
|
|
|
|
runLmCoursierTests
|
2017-02-27 16:15:15 +01:00
|
|
|
else
|
2018-09-28 17:55:42 +02:00
|
|
|
runSbtCoursierTests
|
2015-06-16 20:17:07 +02:00
|
|
|
fi
|
2015-06-17 19:36:53 +02:00
|
|
|
|