-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from rtimush/mima-filters
Add support for mima problem filters
- Loading branch information
Showing
7 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/main/scala/com/rallyhealth/sbt/semver/mima/MimaChecker.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Scala template | ||
*.class | ||
*.log | ||
|
||
# sbt specific | ||
.cache | ||
.history | ||
.lib/ | ||
dist/* | ||
target/ | ||
lib_managed/ | ||
src_managed/ | ||
project/boot/ | ||
project/plugins/project/ | ||
global/ | ||
pending* | ||
|
||
# RallyScriptedPlugin | ||
scriptedOutput-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import com.typesafe.tools.mima.core._ | ||
|
||
scalaVersion in ThisBuild := "2.11.12" | ||
|
||
organization in ThisBuild := "com.rallyhealth.test.scripted" | ||
|
||
logLevel := sbt.Level.Info | ||
|
||
enablePlugins(SemVerPlugin) | ||
|
||
mimaBinaryIssueFilters += ProblemFilters.exclude[Problem]("Thing") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
val pluginVersion = System.getProperty("plugin.version") | ||
if (pluginVersion == null) | ||
throw new RuntimeException( | ||
"""|The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin | ||
) | ||
else addSbtPlugin("com.rallyhealth.sbt" % "sbt-git-versioning" % pluginVersion) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Thing { | ||
|
||
def foo: String = "foo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Set up a git repo appease GitVersioningPlugin and tag first version. | ||
$ exec git init | ||
$ exec git add . | ||
$ exec git commit -am 'Initial commit.' | ||
$ exec git tag v1.0.0 | ||
|
||
# Publish the first version so that SemVer will have a baseline to compare to. | ||
> publishLocal | ||
|
||
# Introduce breaking change. It shouldn't care because it is filtered out. | ||
$ exec git rm src/main/scala/Thing.scala | ||
$ exec git commit -am 'Breaking change.' | ||
|
||
# Reload to have the new commit reflected in the version. Should be 1.0.1-1-hash-SNAPSHOT. | ||
> reload | ||
|
||
# SemVerCheck should pass here. | ||
> semVerCheck |