Skip to content

Commit 7db93d4

Browse files
authored
Publish into Sonatype directly (#89)
close #76
1 parent 1cab413 commit 7db93d4

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

Diff for: README.md

+21-13
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,27 @@ sbt compile
3131
```
3232

3333
### Release process
34-
```shell script
35-
git checkout master
36-
PATCH_211=false sbt release
37-
38-
git checkout v1.*.*
39-
PATCH_211=true sbt clean +publish
40-
```
41-
42-
### Publish documentation
43-
```bash
44-
git checkout v1.*.*
45-
export GIT_USER=<username>; export USE_SSH=true; npm run deploy
46-
```
34+
The publication into Maven Central has been removed from the release process, so now there are few steps:
35+
1. Release.
36+
```shell script
37+
git checkout master
38+
sbt release
39+
```
40+
2. Publish into Maven Central.
41+
Info at [xerial/sbt-sonatype](https://github.com/xerial/sbt-sonatype#advanced-build-settings)
42+
After set the right credentials file at [`$HOME/.sbt/1.0/sonatype.sbt`](https://github.com/xerial/sbt-sonatype#homesbtsbt-version-013-or-10sonatypesbt):
43+
```shell script
44+
git checkout v1.*.*
45+
PATCH_211=false sbt clean +publishSigned sonatypeBundleRelease
46+
47+
git checkout v1.*.*
48+
PATCH_211=true sbt clean +publishSigned sonatypeBundleRelease
49+
```
50+
3. Publish documentation and site.
51+
```bash
52+
git checkout v1.*.*
53+
export GIT_USER=<username>; export USE_SSH=true; npm run deploy
54+
```
4755

4856
## References.
4957

Diff for: build.sbt

+4-10
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ lazy val commonSettings = Seq(
9090
"-target",
9191
"1.8",
9292
"-parameters"
93-
)
93+
),
94+
usePgpKeyHex("A047A2C5A9AFE4850537A00DFC14CE4C2E7B7CBB"),
95+
publishTo := sonatypePublishToBundle.value
9496
)
9597

9698
lazy val disablingPublishingSettings =
@@ -99,11 +101,7 @@ lazy val disablingPublishingSettings =
99101
lazy val enablingPublishingSettings = Seq(
100102
publishArtifact := true, // Enable publish
101103
publishMavenStyle := true,
102-
Test / publishArtifact := false,
103-
// Bintray
104-
bintrayPackageLabels := Seq("scala", "osm", "openstreetmap"),
105-
bintrayRepository := "maven",
106-
bintrayVcsUrl := Some("https://github.com/simplexspatial/osm4scala.git")
104+
Test / publishArtifact := false
107105
)
108106

109107
lazy val disablingCoverage = Seq(coverageEnabled := false)
@@ -126,7 +124,6 @@ def generateSparkFatShadedModule(sparkVersion: String, sparkPrj: Project): Proje
126124
disablingCoverage,
127125
name := s"osm4scala-spark${sparkVersion.head}-shaded",
128126
description := "Spark 2 connector for OpenStreetMap Pbf parser as shaded fat jar.",
129-
bintrayPackage := s"osm4scala-spark${sparkVersion.head}-shaded",
130127
Compile / packageBin := (sparkPrj / Compile/ assembly).value
131128
)
132129

@@ -158,7 +155,6 @@ def generateSparkModule(sparkVersion: String): Project = {
158155
coverageConfig,
159156
name := s"osm4scala-spark${sparkVersion.head}",
160157
description := "Spark 2 connector for OpenStreetMap Pbf parser.",
161-
bintrayPackage := s"osm4scala-spark${sparkVersion.head}",
162158
libraryDependencies ++= Seq(
163159
"org.apache.spark" %% "spark-sql" % sparkVersion % Provided
164160
),
@@ -230,7 +226,6 @@ lazy val root = (project in file("."))
230226
setReleaseVersion,
231227
commitReleaseVersion,
232228
tagRelease,
233-
releaseStepCommandAndRemaining("+publish"),
234229
setNextVersion,
235230
commitNextVersion,
236231
pushChanges
@@ -246,7 +241,6 @@ lazy val core = Project(id = "core", base = file("core"))
246241
coverageExcludedPackages := "org.openstreetmap.osmosis.osmbinary.*",
247242
name := "osm4scala-core",
248243
description := "Scala OpenStreetMap Pbf 2 parser. Core",
249-
bintrayPackage := "osm4scala-core",
250244
Compile / PB.targets := Seq(
251245
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value
252246
)

Diff for: project/plugins.sbt

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def getScalaPBVersion(): String = sys.env.getOrElse("PATCH_211", "false").toBool
1616
case false => scalapbVersion
1717
}
1818

19-
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
20-
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
19+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
20+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
21+
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
2122
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
2223
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.34")
2324

0 commit comments

Comments
 (0)