Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.5
a4e980b0ca9ce4224e84650dff1bf9d44fba3815
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.3"
version = "3.8.5"
maxColumn = 150
align.tokens = []
docstrings.wrap = keep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ checkVersion := {
val v = version.value
val prop = sys.props("project.version")
assert(v == prop, s"Failed to set version to environment variable. Found: $v, Expected: $prop")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ checkVersion := {
val Seq(v) = spaceDelimited("<arg>").parsed
val v2 = version.value
assert(v == v2, s"Expected version is wrong, found ${v2}, expected ${v}")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
2 changes: 1 addition & 1 deletion src/sbt-test/git-versioning/find-tag/changes/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ checkVersion := {
assert(v2 == "1.0.0", s"Failed to detect git tag, found ${v}")
assert(v == "1.0.0", s"Version from ThisBuild not used, found ${v}")
assert(isSnapshot.value == false, "For tagged git repos, snapshot should not be true.")
}
}
2 changes: 1 addition & 1 deletion src/sbt-test/git-versioning/find-tag/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
1 change: 0 additions & 1 deletion src/sbt-test/git-versioning/get-message/changes/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ expectAMessage := {
val headMessage = git.gitHeadMessage.value
assert(headMessage.get == expectedMessage, s"Expected head message to equal '${expectedMessage}', found ${headMessage}")
}

Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@


val commonSettings = Seq(
git.useGitDescribe := true,
git.gitDescribePatterns := Seq(s"${name.value}-*"),
git.gitTagToVersionNumber := { tag =>
if(tag matches s"${name.value}-[0-9].*") Some(tag.replace(s"${name.value}-", ""))
if (tag matches s"${name.value}-[0-9].*") Some(tag.replace(s"${name.value}-", ""))
else None
}
)
Expand All @@ -24,4 +22,4 @@ checkVersion := {
val v2 = (b / version).value
assert(v.startsWith("1.0-1-"), s"multi-module projects should get a version with the matching git describe pattern. $v does not match '1.0-1-'")
assert(v2 == "2.0", s"multi-module projects should get a version with the matching git describe pattern. $v2 != 2.0")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
def proj(name: String) = Project(name, file(name)).enablePlugins(GitVersioning)


lazy val a = proj("a")
lazy val b = proj("b")

Expand All @@ -14,4 +13,4 @@ checkVersion := {
val v = (a / version).value
val v2 = (b / version).value
assert(v == v2, s"multi-module projects should all share the same verison. $v != $v2")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ val checkVersion = taskKey[Unit]("checks the version is the tag versino")
checkVersion := {
val v = version.value
assert(!(v startsWith "1.0"), s"git.baseVersion is meant to be optional ${v}")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ checkSnapshotVersion := {
assert(git.gitUncommittedChanges.value, s"Should detect uncommitted git changes.")
assert(v endsWith "-SNAPSHOT", s"Should have -SNAPSHOT appended when uncommitted changes. ${v}")
assert(isSnapshot.value == true, "-SNAPSHOT versions should have isSnapshot true.")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git.versionProperty := "DUMMY_BUILD_VERSION"
git.useGitDescribe := true
git.gitDescribePatterns := Seq("module-*")
git.gitTagToVersionNumber := { tag =>
if(tag matches "module-.*") Some(tag drop 7)
if (tag matches "module-.*") Some(tag drop 7)
else None
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
2 changes: 1 addition & 1 deletion src/sbt-test/git-versioning/use-describe/changes/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ checkVersion := {
val v = version.value
assert(v != "1.0.0", s"Version from ThisBuild + git describe not used, found ${v}")
assert(v startsWith "1.0.0", s"Version from ThisBuild does not start with tag (git describe), found ${v}")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ checkVersion := {
val v = version.value
assert(v startsWith "1.0", s"git.baseVersion is meant to be optional ${v}")
assert(isSnapshot.value == true, "isSnapshot should be true if not on a tag.")
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
addSbtPlugin("com.github.sbt" % "sbt-git" % sys.props("project.version"))
1 change: 0 additions & 1 deletion test-project/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

val location = file("..").toURI

val sbtGit = RootProject(location)
Expand Down
Loading