Skip to content

Commit

Permalink
Fix release process
Browse files Browse the repository at this point in the history
Some of settings that are not required under gha-scala-workflow release process has been removed

Readme release description updated.
  • Loading branch information
Divs-B committed Jan 18, 2024
1 parent 8f5d19a commit 2aee814
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
19 changes: 2 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,20 +224,5 @@ test

## How to release this library

Beta releases from a WIP branch can be deployed Maven. To do this, start sbt with

`sbt -DRELEASE_TYPE=beta`

In beta mode, when you follow the remaining instructions, you'll be prompted to confirm that you intend to put out a
beta release and if so, the version number should take the form of `x.y.z.beta.n`. While making beta releases you
should always update the next version to reflect the beta status of the code when prompted, i.e. don't just let it
revert to -SNAPSHOT which it will want to do by default.

When making a prod release once your changes have been through the PR process and are merged to the main/master branch,
checkout the main/master branch and start sbt as normal (without the -DRELEASE_TYPE parameter) and run

```sbtshell
release cross
```

Following a successful production release, the version details are automatically committed and pushed back to github.
Releases are done using gha-scala-library-release-workflow release process.
The details are here: https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/making-a-release.md
21 changes: 4 additions & 17 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,23 @@ import sbtversionpolicy.withsbtrelease.ReleaseVersion
name := "scrooge-extras"

ThisBuild / organization := "com.gu"
ThisBuild / scalaVersion := "2.12.17"
ThisBuild / scalaVersion := "2.12.18"
ThisBuild / licenses := Seq(License.Apache2)

ThisBuild / scalacOptions := Seq("-release:11")

val scroogeVersion = "22.7.0" // remember to also update plugins.sbt if this version changes

lazy val commonSettings = Seq(
lazy val artifactProductionSettings = Seq(
organization := "com.gu",
Test / testOptions +=
Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o"),
publishTo := sonatypePublishToBundle.value,
scmInfo := Some(ScmInfo(
url("https://github.com/guardian/scrooge-extras"),
"scm:git:[email protected]:guardian/scrooge-extras.git"
)),
homepage := Some(url("https://github.com/guardian/scrooge-extras")),
developers := List(Developer(
id = "Guardian",
name = "Guardian",
email = null,
url = url("https://github.com/guardian")
)),
resolvers ++= Resolver.sonatypeOssRepos("public")
)

lazy val sbtScroogeTypescript = project.in(file("sbt-scrooge-typescript"))
.dependsOn(typescript)
.settings(commonSettings)
.settings(artifactProductionSettings)
.settings(
name := "sbt-scrooge-typescript",
sbtPlugin := true,
Expand All @@ -49,7 +37,7 @@ lazy val sbtScroogeTypescript = project.in(file("sbt-scrooge-typescript"))
)

lazy val typescript = project.in(file("scrooge-generator-typescript"))
.settings(commonSettings)
.settings(artifactProductionSettings)
.settings(
name := "scrooge-generator-typescript",
libraryDependencies ++= Seq(
Expand All @@ -75,7 +63,6 @@ lazy val typescript = project.in(file("scrooge-generator-typescript"))

lazy val root = Project(id = "root", base = file("."))
.aggregate(sbtScroogeTypescript, typescript)
.settings(commonSettings)
.settings(
publish / skip := true,
releaseVersion := ReleaseVersion.fromAggregatedAssessedCompatibilityWithLatestRelease().value,
Expand Down

0 comments on commit 2aee814

Please sign in to comment.