Remove sbt-pgp-coursier (#269)

This commit is contained in:
Alexandre Archambault 2020-09-14 14:13:11 +02:00 committed by GitHub
parent fdfb676a2e
commit cc0643e71b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 1 additions and 188 deletions

View File

@ -14,7 +14,6 @@ jobs:
include:
- env: SBT_COURSIER=1 TEST_GROUP=1
- env: SBT_COURSIER=1 TEST_GROUP=2
- env: SBT_PGP_COURSIER=1
- env: LM_COURSIER=1 TEST_GROUP=1
- env: LM_COURSIER=1 TEST_GROUP=2
- stage: release

View File

@ -124,26 +124,6 @@ lazy val `sbt-coursier` = project
}
)
lazy val `sbt-pgp-coursier` = project
.in(file("modules/sbt-pgp-coursier"))
.enablePlugins(ScriptedPlugin)
.disablePlugins(MimaPlugin)
.dependsOn(`sbt-coursier`)
.settings(
plugin,
libraryDependencies += {
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.in(pluginCrossBuild).value)
val sv = scalaBinaryVersion.value
val ver = "1.1.2-1"
Defaults.sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv)
},
scriptedDependencies := {
scriptedDependencies.value
// TODO Get dependency projects automatically
scriptedDependencies.in(`sbt-coursier`).value
}
)
lazy val `sbt-coursier-root` = project
.in(file("."))
.disablePlugins(MimaPlugin)
@ -153,8 +133,7 @@ lazy val `sbt-coursier-root` = project
`sbt-coursier`,
`sbt-coursier-shared`,
`sbt-coursier-shared-shaded`,
`sbt-lm-coursier`,
`sbt-pgp-coursier`
`sbt-lm-coursier`
)
.settings(
shared,

View File

@ -1,17 +0,0 @@
package coursier
import com.typesafe.sbt.pgp.PgpKeys.updatePgpSignatures
import coursier.sbtcoursier.UpdateTasks
import sbt.AutoPlugin
object CoursierSbtPgpPlugin extends AutoPlugin {
override def trigger = allRequirements
override def requires = com.typesafe.sbt.SbtPgp && coursier.sbtcoursier.CoursierPlugin
override val projectSettings = Seq(
updatePgpSignatures := UpdateTasks.updateTask(withClassifiers = false, includeSignatures = true).value
)
}

View File

@ -1,3 +0,0 @@
See a similar test under sbt-coursier/src/sbt-test/sbt-coursier-0.13/publish-local-signed
A few things from this test were grabbed from https://github.com/sbt/sbt-pgp/tree/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip

View File

@ -1,9 +0,0 @@
scalaVersion := "2.12.3"
// seen in https://github.com/sbt/sbt-pgp/blob/431c0a50fc5e91b881ebb154f22cc6a0b209be10/pgp-plugin/src/sbt-test/sbt-pgp/skip/build.sbt
credentials.in(GlobalScope) := Seq(Credentials("", "pgp", "", "test password"))
pgpSecretRing := baseDirectory.value / "secring.pgp"
pgpPublicRing := baseDirectory.value / "pubring.pgp"
// seems required by sbt-pgp 1.1.1, even to publish locally
publishTo := Some("foo" at "https://f.oo")

View File

@ -1,11 +0,0 @@
{
val pluginVersion = sys.props.getOrElse(
"plugin.version",
throw new RuntimeException(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
)
)
addSbtPlugin("io.get-coursier" % "sbt-pgp-coursier" % pluginVersion)
}

View File

@ -1,17 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: BCPG v1.51
mQENBFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv
1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ
ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ
FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV
KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY
Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAG0C1Rlc3QgPFRlc3Q+iQEc
BBMBAgAGBQJVXCx9AA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dF0Q==
=wGX/
-----END PGP PRIVATE KEY BLOCK-----

View File

@ -1,41 +0,0 @@
scalaVersion := "2.11.8"
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M5"
lazy val check = TaskKey[Unit]("check")
check := {
val report = com.typesafe.sbt.pgp.PgpKeys.updatePgpSignatures.value
val configReport = report
.configurations
.find { confRep =>
// .toString required with sbt 1.0 (ConfigRef -> String)
confRep.configuration.toString == "compile"
}
.getOrElse {
sys.error("No configuration report found for configuration 'compile'")
}
val moduleReports = configReport.modules
val signatures = moduleReports
.flatMap(_.artifacts)
.filter(_._1.extension == "jar.asc")
.map(_._2)
assert(
signatures.nonEmpty,
"No signatures found"
)
def isCoursierCachePath(p: File) = {
val abs = p.getAbsolutePath
abs.contains("/.coursier/") || // Former cache path
abs.contains("/coursier/") || // New cache path, Linux
abs.contains("/Coursier/") // New cache path, OS X
}
assert(
signatures.forall(isCoursierCachePath),
s"Found signatures not provided by coursier:\n" +
signatures
.filter(!isCoursierCachePath(_))
.map(" " + _)
.mkString("\n")
)
}

View File

@ -1,11 +0,0 @@
{
val pluginVersion = sys.props.getOrElse(
"plugin.version",
throw new RuntimeException(
"""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin
)
)
addSbtPlugin("io.get-coursier" % "sbt-pgp-coursier" % pluginVersion)
}

View File

@ -1,2 +0,0 @@
> checkPgpSignatures
> check

View File

@ -5,10 +5,6 @@ lmCoursier() {
[ "${LM_COURSIER:-""}" = 1 ]
}
sbtPgpCoursier() {
[ "${SBT_PGP_COURSIER:-""}" = 1 ]
}
sbtShading() {
[ "${SBT_SHADING:-""}" = 1 ]
}
@ -51,25 +47,9 @@ runSbtShadingTests() {
./sbt ++$TRAVIS_SCALA_VERSION sbt-shading/scripted
}
runSbtPgpCoursierTests() {
addPgpKeys
./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"
}
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
}
if sbtShading; then
runSbtShadingTests
elif sbtPgpCoursier; then
runSbtPgpCoursierTests
elif lmCoursier; then
runLmCoursierTests
else