mirror of https://github.com/sbt/sbt.git
Remove Bintray from Linux releases
This commit is contained in:
parent
068700b11e
commit
03e83bfb00
|
|
@ -1,6 +1,4 @@
|
||||||
import scala.util.control.Exception.catching
|
import scala.util.control.Exception.catching
|
||||||
import _root_.bintray.InternalBintrayKeys._
|
|
||||||
import _root_.bintray.{BintrayRepo, Bintray}
|
|
||||||
import NativePackagerHelper._
|
import NativePackagerHelper._
|
||||||
import com.typesafe.sbt.packager.SettingsHelper._
|
import com.typesafe.sbt.packager.SettingsHelper._
|
||||||
import DebianConstants._
|
import DebianConstants._
|
||||||
|
|
@ -72,15 +70,16 @@ val x86MacImageName = s"sbtn-$x86MacPlatform"
|
||||||
val x86LinuxImageName = s"sbtn-$x86LinuxPlatform"
|
val x86LinuxImageName = s"sbtn-$x86LinuxPlatform"
|
||||||
val x86WindowsImageName = s"sbtn-$x86WindowsPlatform.exe"
|
val x86WindowsImageName = s"sbtn-$x86WindowsPlatform.exe"
|
||||||
|
|
||||||
|
organization in ThisBuild := "org.scal-sbt"
|
||||||
|
version in ThisBuild := "0.1.0"
|
||||||
|
|
||||||
// This build creates a SBT plugin with handy features *and* bundles the SBT script for distribution.
|
// This build creates a SBT plugin with handy features *and* bundles the SBT script for distribution.
|
||||||
val root = (project in file(".")).
|
val root = (project in file(".")).
|
||||||
enablePlugins(UniversalPlugin, LinuxPlugin, DebianPlugin, RpmPlugin, WindowsPlugin,
|
enablePlugins(UniversalPlugin, LinuxPlugin, DebianPlugin, RpmPlugin, WindowsPlugin,
|
||||||
UniversalDeployPlugin, DebianDeployPlugin, RpmDeployPlugin, WindowsDeployPlugin).
|
UniversalDeployPlugin, DebianDeployPlugin, RpmDeployPlugin, WindowsDeployPlugin).
|
||||||
settings(
|
settings(
|
||||||
organization := "org.scala-sbt",
|
|
||||||
name := "sbt-launcher-packaging",
|
name := "sbt-launcher-packaging",
|
||||||
packageName := "sbt",
|
packageName := "sbt",
|
||||||
version := "0.1.0",
|
|
||||||
crossTarget := target.value,
|
crossTarget := target.value,
|
||||||
clean := {
|
clean := {
|
||||||
val _ = (clean in dist).value
|
val _ = (clean in dist).value
|
||||||
|
|
@ -92,7 +91,6 @@ val root = (project in file(".")).
|
||||||
case _ => Nil
|
case _ => Nil
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
useGpg := true,
|
|
||||||
usePgpKeyHex("642AC823"),
|
usePgpKeyHex("642AC823"),
|
||||||
pgpSecretRing := file(s"""${sys.props("user.home")}""") / ".ssh" / "scalasbt.key",
|
pgpSecretRing := file(s"""${sys.props("user.home")}""") / ".ssh" / "scalasbt.key",
|
||||||
pgpPublicRing := file(s"""${sys.props("user.home")}""") / ".ssh" / "scalasbt.pub",
|
pgpPublicRing := file(s"""${sys.props("user.home")}""") / ".ssh" / "scalasbt.pub",
|
||||||
|
|
@ -352,54 +350,31 @@ def makePublishToForConfig(config: Configuration) = {
|
||||||
// Add the publish to and ensure global resolvers has the resolver we just configured.
|
// Add the publish to and ensure global resolvers has the resolver we just configured.
|
||||||
inConfig(config)(Seq(
|
inConfig(config)(Seq(
|
||||||
name := "sbt",
|
name := "sbt",
|
||||||
bintrayOrganization := {
|
bintrayDebianUrl := s"https://scala.jfrog.io/artifactory/debian/",
|
||||||
// offline installation exceeds 50MB file limit for OSS organization
|
bintrayDebianExperimentalUrl := s"https://scala.jfrog.io/artifactory/debian-experimental/",
|
||||||
if (sbtOfflineInstall) Some("sbt")
|
bintrayRpmUrl := s"https://scala.jfrog.io/artifactory/rpm/",
|
||||||
else Some("sbt")
|
bintrayRpmExperimentalUrl := s"https://scala.jfrog.io/artifactory/rpm-experimental/",
|
||||||
},
|
bintrayGenericPackagesUrl := s"https://scala.jfrog.io/artifactory/native-packages/",
|
||||||
bintrayRepository := bintrayTripple.value._1,
|
|
||||||
bintrayRepo := Bintray.cachedRepo(bintrayEnsureCredentials.value,
|
|
||||||
bintrayOrganization.value,
|
|
||||||
bintrayRepository.value),
|
|
||||||
bintrayPackage := "sbt",
|
|
||||||
|
|
||||||
bintrayDebianUrl := s"https://api.bintray.com/content/${bintrayOrganization.value.get}/debian/",
|
|
||||||
bintrayDebianExperimentalUrl := s"https://api.bintray.com/content/${bintrayOrganization.value.get}/debian-experimental/",
|
|
||||||
bintrayRpmUrl := s"https://api.bintray.com/content/${bintrayOrganization.value.get}/rpm/",
|
|
||||||
bintrayRpmExperimentalUrl := s"https://api.bintray.com/content/${bintrayOrganization.value.get}/rpm-experimental/",
|
|
||||||
bintrayGenericPackagesUrl := s"https://api.bintray.com/content/${bintrayOrganization.value.get}/native-packages/",
|
|
||||||
bintrayTripple := {
|
bintrayTripple := {
|
||||||
config.name match {
|
config.name match {
|
||||||
case Debian.name if isExperimental => ("debian-experimental", bintrayDebianExperimentalUrl.value, bintrayLinuxPattern)
|
case Debian.name if isExperimental => ("debian-experimental", bintrayDebianExperimentalUrl.value, bintrayLinuxPattern)
|
||||||
case Debian.name => ("debian", bintrayDebianUrl.value, bintrayLinuxPattern)
|
case Debian.name => ("debian", bintrayDebianUrl.value, bintrayLinuxPattern)
|
||||||
case Rpm.name if isExperimental => ("rpm-experimental", bintrayRpmExperimentalUrl.value, bintrayLinuxPattern)
|
case Rpm.name if isExperimental => ("rpm-experimental", bintrayRpmExperimentalUrl.value, bintrayLinuxPattern)
|
||||||
case Rpm.name => ("rpm", bintrayRpmUrl.value, bintrayLinuxPattern)
|
case Rpm.name => ("rpm", bintrayRpmUrl.value, bintrayLinuxPattern)
|
||||||
case _ => ("native-packages", bintrayGenericPackagesUrl.value, bintrayGenericPattern)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
publishTo := {
|
publishTo := {
|
||||||
val (id, url, pattern) = bintrayTripple.value
|
val (id, url, pattern) = bintrayTripple.value
|
||||||
val resolver = Resolver.url(id, new URL(url))(Patterns(pattern))
|
val resolver = Resolver.url(id, new URL(url))(Patterns(pattern))
|
||||||
Some(resolver)
|
Some(resolver)
|
||||||
},
|
}
|
||||||
bintrayReleaseAllStaged := bintrayRelease(bintrayRepo.value, bintrayPackage.value, version.value, sLog.value)
|
|
||||||
// Uncomment to release right after publishing
|
|
||||||
// publish <<= (publish, bintrayRepo, bintrayPackage, version, sLog) apply { (publish, bintrayRepo, bintrayPackage, version, sLog) =>
|
|
||||||
// for {
|
|
||||||
// pub <- publish
|
|
||||||
// repo <- bintrayRepo
|
|
||||||
// } yield bintrayRelease(repo, bintrayPackage, version, sLog)
|
|
||||||
// }
|
|
||||||
)) ++ Seq(
|
)) ++ Seq(
|
||||||
resolvers ++= ((publishTo in config) apply (_.toSeq)).value
|
resolvers ++= ((publishTo in config) apply (_.toSeq)).value
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
def publishToSettings =
|
def publishToSettings =
|
||||||
Seq[Configuration](Debian, Universal, Windows, Rpm) flatMap makePublishToForConfig
|
Seq[Configuration](Debian, Rpm) flatMap makePublishToForConfig
|
||||||
|
|
||||||
def bintrayRelease(repo: BintrayRepo, pkg: String, version: String, log: Logger): Unit =
|
|
||||||
repo.release(pkg, version, log)
|
|
||||||
|
|
||||||
def downloadUrl(uri: URI, out: File): Unit =
|
def downloadUrl(uri: URI, out: File): Unit =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
import sbt._
|
import sbt._
|
||||||
import Keys._
|
import Keys._
|
||||||
import com.typesafe.sbt.SbtPgp
|
import com.jsuereth.sbtpgp.SbtPgp
|
||||||
import com.typesafe.sbt.packager.universal.{ UniversalPlugin, UniversalDeployPlugin }
|
import com.typesafe.sbt.packager.universal.{ UniversalPlugin, UniversalDeployPlugin }
|
||||||
import com.typesafe.sbt.packager.debian.{ DebianPlugin, DebianDeployPlugin }
|
import com.typesafe.sbt.packager.debian.{ DebianPlugin, DebianDeployPlugin }
|
||||||
import com.typesafe.sbt.packager.rpm.{ RpmPlugin, RpmDeployPlugin }
|
import com.typesafe.sbt.packager.rpm.{ RpmPlugin, RpmDeployPlugin }
|
||||||
import com.typesafe.sbt.pgp.gpgExtension
|
import com.jsuereth.sbtpgp.gpgExtension
|
||||||
|
|
||||||
object PackageSignerPlugin extends sbt.AutoPlugin {
|
object PackageSignerPlugin extends sbt.AutoPlugin {
|
||||||
override def trigger = allRequirements
|
override def trigger = allRequirements
|
||||||
override def requires = SbtPgp && UniversalDeployPlugin && DebianDeployPlugin && RpmDeployPlugin
|
override def requires = SbtPgp && UniversalDeployPlugin && DebianDeployPlugin && RpmDeployPlugin
|
||||||
|
|
||||||
import com.typesafe.sbt.pgp.PgpKeys._
|
import com.jsuereth.sbtpgp.PgpKeys._
|
||||||
import UniversalPlugin.autoImport._
|
import UniversalPlugin.autoImport._
|
||||||
import DebianPlugin.autoImport._
|
import DebianPlugin.autoImport._
|
||||||
import RpmPlugin.autoImport._
|
import RpmPlugin.autoImport._
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0-M9")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6")
|
||||||
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.10"
|
libraryDependencies += "net.databinder" %% "dispatch-http" % "0.8.10"
|
||||||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1")
|
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-export-repo" % "0.1.1")
|
addSbtPlugin("com.eed3si9n" % "sbt-export-repo" % "0.1.1")
|
||||||
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.1")
|
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue