From cc0643e71b0a065c80e302a1f0ab51cfdbb716e4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 14 Sep 2020 14:13:11 +0200 Subject: [PATCH] Remove sbt-pgp-coursier (#269) --- .travis.yml | 1 - build.sbt | 23 +---------- .../scala/coursier/CoursierSbtPgpPlugin.scala | 17 -------- .../publish-local-signed/README | 3 -- .../publish-local-signed/build.sbt | 9 ---- .../publish-local-signed/project/plugins.sbt | 11 ----- .../publish-local-signed/pubring.pgp | 17 -------- .../publish-local-signed/secring.pgp | 32 --------------- .../src/main/scala/Foo.scala | 1 - .../publish-local-signed/test | 1 - .../sbt-pgp-coursier/simple/build.sbt | 41 ------------------- .../simple/project/plugins.sbt | 11 ----- .../src/sbt-test/sbt-pgp-coursier/simple/test | 2 - scripts/travis.sh | 20 --------- 14 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 modules/sbt-pgp-coursier/src/main/scala/coursier/CoursierSbtPgpPlugin.scala delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/build.sbt delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/project/plugins.sbt delete mode 100644 modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/test diff --git a/.travis.yml b/.travis.yml index 3afc29de5..a5d030070 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/build.sbt b/build.sbt index b0113e0df..e33e8e989 100644 --- a/build.sbt +++ b/build.sbt @@ -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, diff --git a/modules/sbt-pgp-coursier/src/main/scala/coursier/CoursierSbtPgpPlugin.scala b/modules/sbt-pgp-coursier/src/main/scala/coursier/CoursierSbtPgpPlugin.scala deleted file mode 100644 index 8fe6bbd76..000000000 --- a/modules/sbt-pgp-coursier/src/main/scala/coursier/CoursierSbtPgpPlugin.scala +++ /dev/null @@ -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 - ) - -} diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README deleted file mode 100644 index 507b1e0e2..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/README +++ /dev/null @@ -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 diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt deleted file mode 100644 index 5c9dd0473..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/build.sbt +++ /dev/null @@ -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") diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt deleted file mode 100644 index d59204c4b..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/project/plugins.sbt +++ /dev/null @@ -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) -} diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp deleted file mode 100644 index ee55772cc..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/pubring.pgp +++ /dev/null @@ -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 -BBMBAgAGBQJVXCx9AAoJEKotvJKVuRt6fQkH/1XhdHxOB5m92TasMkxCqjuK0EtQ -0HEIkoRC+Z9gOUqlhK58y+8DK9ZAEx/e09CDK1N+x/R3xQUKh2KbUpS7yiNzzqZO -OejWtmWw6gYNHy1COP9WKT8Qgr+z4d7GBTrGthEhvZftHyyqlN6JZJZ2ZcvE/Odz -QkMbd4aeRXi+KgzHp4fa1hLaA2BT7TT1trYH2L6OI6VbcEebnz+up738liHq9p/R -JrJP4JjLzWtEkL83pE6FHhXowsdaG8WKYfWRstX7RixHq5P13PW/iAZEAmJb08ER -mmguiicjExRk7UaIVwKPa5P1DAOgeK/ejCLsxrUKspIgt6JLQFbprGZHRdE= -=/1s8 ------END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp deleted file mode 100644 index 3123d8c7d..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/secring.pgp +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN PGP PRIVATE KEY BLOCK----- -Version: BCPG v1.51 - -lQO+BFVcLH0BCACmERkKh73zr+0nFl7/6WWP3QcNa3msWDlArP6GzQEOmFBNZEtv -1BRSKz1fGl4aZzpNPDh2rNcsjVhJPzwVLUzsJuWgBa2EdYafnsUjQ37V998iFhtZ -ZgbXieJ2yMvaNPPrPjgYBAZFrnQmH0oQDx+GWDd5Y3lQBx0heIJA5YjPN3meDzqZ -FC0qxSVeCPFYaxAFoMnNDEohpvGV3iiUTAyTgSDofxJqVV20oeMCJzC89VskCjSV -KIlCnKIRFA+WtND1AsJuIBM/x4JQkRF8xc/2tS5xGXSQllgwxHXEnhDDXcT0o6pY -Ni2xYSG0gcmwaBGvx8N1RjWcVms/iJ4ViayxABEBAAH+AwMCQJCBiVce8z5gAZr+ -L8W6NOs8orCIgLbCjKAHuKan9mZXtvOaml/8EDiBjLvwekUQj0OI6S29y5QsQpvn -lo8vXAsJnA/Q0olrAim2aZPOXVjQOYsOwExo4SAu7zXBQ3w3+jYsM5kHY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0SQvzekToUeFejCx1obxYph9ZGy1ftG -LEerk/Xc9b+IBkQCYlvTwRGaaC6KJyMTFGTtRohXAo9rk/UMA6B4r96MIuzGtQqy -kiC3oktAVumsZkdF0Q== -=wGX/ ------END PGP PRIVATE KEY BLOCK----- \ No newline at end of file diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala deleted file mode 100644 index d3c853cc0..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/src/main/scala/Foo.scala +++ /dev/null @@ -1 +0,0 @@ -object Foo diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test deleted file mode 100644 index 97640db3a..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/publish-local-signed/test +++ /dev/null @@ -1 +0,0 @@ -> publishLocalSigned diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/build.sbt b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/build.sbt deleted file mode 100644 index 44984744e..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/build.sbt +++ /dev/null @@ -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") - ) -} diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/project/plugins.sbt b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/project/plugins.sbt deleted file mode 100644 index d59204c4b..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/project/plugins.sbt +++ /dev/null @@ -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) -} diff --git a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/test b/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/test deleted file mode 100644 index b09384dc8..000000000 --- a/modules/sbt-pgp-coursier/src/sbt-test/sbt-pgp-coursier/simple/test +++ /dev/null @@ -1,2 +0,0 @@ -> checkPgpSignatures -> check diff --git a/scripts/travis.sh b/scripts/travis.sh index 50a0ef03c..072ffccd8 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -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