Skip to content

Commit

Permalink
Added required information for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
ColOfAbRiX committed Nov 13, 2020
1 parent 0179b99 commit eb04c3c
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
title: ""
labels: 'bug'
assignees: ''

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEAT]"
title: ""
labels: 'feature'
assignees: ''

Expand Down
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: Task
about: A thing that needs to be done like a refactoring
title: "[TASK]"
about: A thing that needs to be done on the project, like a refactoring or updating a library
title: ''
labels: 'task'
assignees: ''

---

## Description

A clear and concise description of what needs to be done.
A clear and concise description of what needs to be done. The more details you add the better it
will help the assignee.
79 changes: 49 additions & 30 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,41 @@ import xerial.sbt.Sonatype._

// General
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / turbo := true
ThisBuild / scalaVersion := ScalaLangVersion

// Project information
ThisBuild / homepage := Some(url("https://github.com/ColOfAbRiX/figlet4s"))
ThisBuild / organization := "com.colofabrix.scala"
ThisBuild / organizationName := "ColOfAbRiX"
ThisBuild / organizationHomepage := Some(url("https://github.com/ColOfAbRiX"))
ThisBuild / licenses := Seq("MIT" -> url("https://opensource.org/licenses/MIT"))
ThisBuild / scalaVersion := ScalaLangVersion
ThisBuild / turbo := true
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/ColOfAbRiX/figlet4s"), "scm:[email protected]:ColOfAbRiX/figlet4s.git"),
)
ThisBuild / developers := List(
Developer("ColOfAbRiX", "Fabrizio Colonna", "[email protected]", url("http://github.com/ColOfAbRiX")),
)

// Publishing
ThisBuild / pomIncludeRepository := { _ => false }
ThisBuild / publishMavenStyle := true
ThisBuild / sonatypeProjectHosting := Some(
GitHubHosting("ColOfAbRiX", "figlet4s", "[email protected]"),
)
ThisBuild / publishTo := Some(
if (isSnapshot.value) Opts.resolver.sonatypeSnapshots
else Opts.resolver.sonatypeStaging,
)

// GIT version information
ThisBuild / dynverSonatypeSnapshots := true

// Scalafix
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value)
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision

val commonSettings: Seq[Def.Setting[_]] = Seq(
// Testing
Expand Down Expand Up @@ -42,41 +73,29 @@ val commonSettings: Seq[Def.Setting[_]] = Seq(
Wart.StringPlusAny,
Wart.ToString,
// Covered by ScalaFix
Wart.PublicInference
Wart.PublicInference,
),

// Scaladoc
Compile / autoAPIMappings := true,
Compile / doc / scalacOptions ++= Seq(
"-doc-title", "Figlet4s API Documentation",
"-doc-version", version.value,
"-encoding", "UTF-8"
"-doc-title",
"Figlet4s API Documentation",
"-doc-version",
version.value,
"-encoding",
"UTF-8",
),

// Publishing
publishMavenStyle := true,
)

// GIT version information
ThisBuild / dynverSonatypeSnapshots := true

// Scalafix
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.4.3"
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value)
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision

// Publishing
ThisBuild / sonatypeProjectHosting := Some(
GitHubHosting("ColOfAbRiX", "figlet4s", "[email protected]")
)
ThisBuild / developers := List(
Developer("ColOfAbRiX", "Fabrizio Colonna", "[email protected]", url("http://github.com/ColOfAbRiX")),
)
// ThisBuild / publishTo := sonatypePublishTo.value
ThisBuild / publishTo := Some(
if (isSnapshot.value) Opts.resolver.sonatypeSnapshots
else Opts.resolver.sonatypeStaging
// Packaging and publishing
Compile / packageBin / packageOptions ++= Seq(
Package.ManifestAttributes(
("Git-Build-Branch", git.gitCurrentBranch.value),
("Git-Head-Commit-Date", git.gitHeadCommitDate.value.getOrElse("")),
("Git-Head-Commit", git.gitHeadCommit.value.getOrElse("")),
("Git-Uncommitted-Changes", git.gitUncommittedChanges.value.toString),
),
),
)

// Figlet4s
Expand Down
12 changes: 7 additions & 5 deletions project/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ lazy val WartremoverVersion = "2.4.10"
// Release
lazy val AssemblyVersion = "0.15.0"
lazy val DynverVersion = "4.1.1"
lazy val GitVersion = "1.0.0"
lazy val GpgVersion = "2.0.1"
lazy val NativePackagerVersion = "1.7.5"
lazy val SonatypeVersion = "3.9.5"
Expand All @@ -40,8 +41,9 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % SCoverageVersion
addSbtPlugin("org.wartremover" % "sbt-wartremover" % WartremoverVersion)

// Release
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % AssemblyVersion)
addSbtPlugin("com.dwijnand" % "sbt-dynver" % DynverVersion)
addSbtPlugin("com.jsuereth" % "sbt-pgp" % GpgVersion)
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % NativePackagerVersion)
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % SonatypeVersion)
addSbtPlugin("com.dwijnand" % "sbt-dynver" % DynverVersion)
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % AssemblyVersion)
addSbtPlugin("com.jsuereth" % "sbt-pgp" % GpgVersion)
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % NativePackagerVersion)
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % GitVersion)
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % SonatypeVersion)

0 comments on commit eb04c3c

Please sign in to comment.