Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
Moving to sbt-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenny Sivapalan committed Jul 15, 2016
1 parent c5b4e6d commit 0145dca
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
17 changes: 4 additions & 13 deletions README.md
Expand Up @@ -55,22 +55,13 @@ Ensure tests pass before a release.

sbt clean test

Release versioning uses the latest git tag, with semantic versioning.
Then release using:

git tag -t v0.1.1
git push --tags

Note: use `sbt version` to double check the version before publishing.

Then release to sonatype using [`sbt-sonatype`](https://github.com/xerial/sbt-sonatype). Note you will need:
sbt release

Note you will need:

- access to the `com.gu` group in Sonatype
- a gpg key with public key sent to http://pgp.mit.edu/ see [sbt-pgp](http://www.scala-sbt.org/sbt-pgp)
- your Sonatype credentials accessible to SBT using [sbt-sonatype](https://github.com/xerial/sbt-sonatype#homesbtsbt-versionsonatypesbt)

```
sbt
> clean
> + publishSigned
> sonatypeRelease
```
17 changes: 16 additions & 1 deletion build.sbt
@@ -1,3 +1,5 @@
import ReleaseTransformations._

name := """editorial-permissions-client"""

organization := "com.gu"
Expand All @@ -23,4 +25,17 @@ libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.5" % "test"
)

com.typesafe.sbt.SbtGit.versionWithGit
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _)),
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
pushChanges
)
6 changes: 3 additions & 3 deletions project/plugins.sbt
@@ -1,5 +1,5 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.4")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "0.5.1")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.3")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
2 changes: 2 additions & 0 deletions sonatype.sbt
@@ -1,3 +1,5 @@
sonatypeProfileName := "com.gu"

pomExtra in Global := {
<url>https://github.com/guardian/editorial-permissions-client</url>
<scm>
Expand Down
1 change: 1 addition & 0 deletions version.sbt
@@ -0,0 +1 @@
version in ThisBuild := "0.4-SNAPSHOT"

0 comments on commit 0145dca

Please sign in to comment.