Skip to content

Commit

Permalink
Assorted build updates
Browse files Browse the repository at this point in the history
* drop sbt-release
* swap to sbt-gpg
* disable fatal warnings
* update back-publish script
  • Loading branch information
armanbilge committed Feb 23, 2024
1 parent dd89f26 commit 5827bb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ lazy val `kind-projector` = project
crossTarget := target.value / s"scala-${scalaVersion.value}", // workaround for https://github.com/sbt/sbt/issues/5097
crossVersion := CrossVersion.full,
crossScalaVersions := (ThisBuild / crossScalaVersions).value,
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishMavenStyle := true,
sonatypeProfileName := organization.value,
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "s01.oss.sonatype.org",
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
Compile / unmanagedSourceDirectories ++= {
(Compile / unmanagedSourceDirectories).value.flatMap { dir =>
Expand All @@ -125,7 +127,6 @@ lazy val `kind-projector` = project
"-deprecation",
"-unchecked",
),
Compile / compile / scalacOptions += "-Xfatal-warnings",
Test / scalacOptions ++= {
val jar = (Compile / packageBin).value
Seq("-Yrangepos", s"-Xplugin:${jar.getAbsolutePath}", s"-Jdummy=${jar.lastModified}") // ensures recompile
Expand Down
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0")
4 changes: 2 additions & 2 deletions scripts/back-publish
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

usage() {
echo "Usage: $0 [-t <tag>] [-s <scala_version>]" 1>&2
echo "Example: $0 -t v0.13.2 -s 2.13.8"
echo "Example: $0 -t v0.13.3 -s 2.13.14"
}

while getopts "s:t:" OPTION; do
Expand Down Expand Up @@ -34,4 +34,4 @@ if [ "$JAVA_VERSION" -ne 8 ]; then
fi

git checkout $TAG
sbt ++$SCALA_VERSION 'set sonatypeCredentialHost := "s01.oss.sonatype.org"' 'set `kind-projector`/sonatypeCredentialHost := "s01.oss.sonatype.org"' 'set publishTo := Some(MavenRepository("sonatype-s01-releases", "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"))' clean test publishSigned sonatypeRelease
sbt ++$SCALA_VERSION clean test publish sonatypeBundleRelease

0 comments on commit 5827bb8

Please sign in to comment.