Skip to content

Commit

Permalink
Fix misc issues with Delta 1.1 release process
Browse files Browse the repository at this point in the history
In order to have our release process properly cross-publish our different Scala versions, we had to re-arrange some codes in `build.sbt`.

I followed this tutorial [here](https://www.acervera.com/blog/2020/04/sbt-crossversion-release-bintray/#sbt-release-configuration) which basically just has us move the `releaseProcess` to the root project instead of in each sub-project. This step is also documented on the official sbt docs [here](https://www.scala-sbt.org/1.x/docs/Cross-Build.html#Note+about+sbt-release).

I also noticed, when running our integration tests, that they were at first using the **old** JAR, and not the newly-staged JAR. Clearing the ivy2 local directory resolved this.

Closes #847

Signed-off-by: Scott Sandre <[email protected]>

GitOrigin-RevId: 6bfc5b0397eb02bcf54b78b2ca746be854091155
  • Loading branch information
scottsand-db committed Dec 1, 2021
1 parent 3509050 commit 2ddff5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
40 changes: 18 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ crossScalaVersions := Nil

lazy val commonSettings = Seq(
organization := "io.delta",
scalaVersion := "2.12.14",
scalaVersion := scala212,
crossScalaVersions := Seq(scala212, scala213),
fork := true
)
Expand Down Expand Up @@ -298,7 +298,10 @@ import ReleaseTransformations._

lazy val releaseSettings = Seq(
publishMavenStyle := true,

publishArtifact := true,
Test / publishArtifact := false,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseCrossBuild := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) {
Expand All @@ -307,25 +310,7 @@ lazy val releaseSettings = Seq(
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
},

releasePublishArtifactsAction := PgpKeys.publishSigned.value,

releaseCrossBuild := true,

releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishLocalSigned"),
setNextVersion,
commitNextVersion
),

licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),

pomExtra :=
<url>https://delta.io/</url>
<scm>
Expand Down Expand Up @@ -373,6 +358,17 @@ lazy val releaseSettings = Seq(

// Looks like some of release settings should be set for the root project as well.
publishArtifact := false // Don't release the root project
publish := {}
publish / skip := true
publishTo := Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
releaseCrossBuild := false
releaseCrossBuild := false // Don't use sbt-release's cross facility
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion
)
1 change: 1 addition & 0 deletions run-integration-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def run_pip_installation_tests(root_dir, version, use_testpypi, extra_maven_repo
def clear_artifact_cache():
print("Clearing Delta artifacts from ivy2 and mvn cache")
delete_if_exists(os.path.expanduser("~/.ivy2/cache/io.delta"))
delete_if_exists(os.path.expanduser("~/.ivy2/local/io.delta"))
delete_if_exists(os.path.expanduser("~/.m2/repository/io/delta/"))


Expand Down

0 comments on commit 2ddff5e

Please sign in to comment.