aboutsummaryrefslogtreecommitdiff
path: root/plugins/sonatype-release/src/SonatypeRelease.scala
blob: 57c27df01dfa85f87fbb75075e4c39b62131190f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package cbt
// TODO: maybe move this into stage2 to avoid having to call zinc separately for this as a plugin

import cbt.sonatype.SonatypeLib

/**
  * Sonatype release plugin.
  * It provides ability to release your artifacts to Sonatype OSSRH
  * and publish to Central repository (aka Maven Central).
  *
  * Release proccess is executed in two steps:
  * • `sonatypePublishSigned`
  *     - creates staging repository to publish artifacts;
  *     - publishes signed artifacts(jars) to staging repository.
  * • `sonatypeRelease`
  *     - closes staging repository;
  *     - promotes staging repository to Central repository;
  *     - drops staging repository after release.
  */
trait SonatypeRelease extends Publish{
  protected def sonatypeLib = SonatypeLib(groupId)

  def publishSonatype = sonatypeLib.publishSigned( publishedArtifacts, releaseFolder )

  override def publish = super.publish ++ publishSonatype
}