Skip to content

Commit

Permalink
add label for artifact badges. (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi authored Jan 3, 2023
1 parent 3a1620a commit b3aa1cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zio-sbt-website/src/main/scala/zio/sbt/WebsiteUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ object WebsiteUtils {
s"![CI Badge](https://github.com/$githubUser/$githubRepo/workflows/CI/badge.svg)"

def snapshotBadge(groupId: String, artifact: String): String = {
val badge = s"https://img.shields.io/nexus/s/https/oss.sonatype.org/$groupId/$artifact.svg"
val link = s"https://oss.sonatype.org/content/repositories/snapshots/${groupId.replace('.', '/')}/$artifact/"
val badge =
s"https://img.shields.io/nexus/s/https/oss.sonatype.org/$groupId/$artifact.svg?label=Sonatype%20Snapshot"
val link = s"https://oss.sonatype.org/content/repositories/snapshots/${groupId.replace('.', '/')}/$artifact/"
s"[![Sonatype Snapshots]($badge)]($link)"
}

def releaseBadge(groupId: String, artifact: String): String = {
val badge = s"https://img.shields.io/nexus/r/https/oss.sonatype.org/$groupId/$artifact.svg"
val badge = s"https://img.shields.io/nexus/r/https/oss.sonatype.org/$groupId/$artifact.svg?label=Sonatype%20Release"
val link = s"https://oss.sonatype.org/content/repositories/releases/${groupId.replace('.', '/')}/$artifact/"
s"[![Sonatype Releases]($badge)]($link)"
}
Expand Down

0 comments on commit b3aa1cf

Please sign in to comment.