Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 9d8ff47

Browse files
committed
Use sbt-git for versioning
1 parent c0ce1bf commit 9d8ff47

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

build.sbt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ val root =
2828

2929
lazy val demo =
3030
project.in(file("demo"))
31+
.enablePlugins(GitVersioning)
32+
.enablePlugins(GitBranchPrompt)
3133
.enablePlugins(ScalaJSBundlerPlugin)
3234
.settings(commonSettings: _*)
3335
.settings(
@@ -45,6 +47,8 @@ lazy val demo =
4547

4648
lazy val facade =
4749
project.in(file("facade"))
50+
.enablePlugins(GitVersioning)
51+
.enablePlugins(GitBranchPrompt)
4852
.enablePlugins(ScalaJSBundlerPlugin)
4953
.settings(commonSettings: _*)
5054
.settings(
@@ -73,7 +77,6 @@ lazy val facade =
7377

7478
lazy val commonSettings = Seq(
7579
scalaVersion := "2.12.4",
76-
version := "0.0.6-SNAPSHOT",
7780
organization := "io.github.cquiroz",
7881
description := "scala.js facade for react-virtualized",
7982
homepage := Some(url("https://github.com/cquiroz/scalajs-react-virtualized")),
@@ -136,14 +139,15 @@ lazy val commonSettings = Seq(
136139
"-Ywarn-unused:privates", // Warn if a private member is unused.
137140
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused.
138141
"-P:scalajs:sjsDefinedByDefault"
139-
)
142+
),
143+
// Settings to use git to define the version of the project
144+
git.useGitDescribe := true,
145+
git.formattedShaVersion := git.gitHeadCommit.value map { sha => s"v$sha" },
146+
git.uncommittedSignifier in ThisBuild := Some("UNCOMMITTED"),
147+
useGpg := true
140148
) ++ semanticdbScalacSettings
141149

142150
lazy val pomData =
143-
<scm>
144-
<url>git@github.com:cquiroz/scalajs-react-virtualized.git</url>
145-
<connection>scm:git:git@github.com:cquiroz/scalajs-react-virtualized.git</connection>
146-
</scm>
147151
<developers>
148152
<developer>
149153
<id>cquiroz</id>

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.9.0")
55
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
66

77
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
8+
9+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")

0 commit comments

Comments
 (0)