From 723343727e4e39590f338db9383ab7a0bb64eb8f Mon Sep 17 00:00:00 2001 From: Jeff May Date: Tue, 26 Dec 2017 15:39:52 -0800 Subject: [PATCH 1/3] Changed references from RallyVersioningPlugin to GitVersioningPlugin --- .../com/rallyhealth/sbt/semver/SemVerPluginUtils.scala | 2 +- .../rallyhealth/sbt/versioning/GitVersioningPlugin.scala | 8 ++++---- src/sbt-test/semver/multi-project/test | 2 +- src/sbt-test/semver/new-artifact/test | 2 +- src/sbt-test/semver/rename-artifact/test | 2 +- src/sbt-test/semver/tagging/test | 2 +- src/sbt-test/versioning/fromGit/test | 2 +- src/sbt-test/versioning/odd/test | 4 ++-- src/sbt-test/versioning/tagging/test | 2 +- src/test/resources/scriptedOutput-example1.txt | 8 ++++---- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/scala/com/rallyhealth/sbt/semver/SemVerPluginUtils.scala b/src/main/scala/com/rallyhealth/sbt/semver/SemVerPluginUtils.scala index deb523c..2abb217 100644 --- a/src/main/scala/com/rallyhealth/sbt/semver/SemVerPluginUtils.scala +++ b/src/main/scala/com/rallyhealth/sbt/semver/SemVerPluginUtils.scala @@ -29,7 +29,7 @@ object SemVerPluginUtils { // effectively. It depends on a lot of different SBT settings, and extracting them is a) messy and b) they are // often hard to mock - // "version" SettingKey is assumed to be a SemanticVersion; see the overload in RallyVersioningPlugin + // "version" SettingKey is assumed to be a SemanticVersion; see the overload in GitVersioningPlugin val semver: SemanticVersion = SemanticVersion.fromString(version.value).getOrElse( throw new IllegalArgumentException(s"version=${version.value} is not a valid SemVer")) val enforceAfterVersion: Option[ReleaseVersion] = semVerEnforceAfterVersion.value.map(parseAsCleanOrThrow) diff --git a/src/main/scala/com/rallyhealth/sbt/versioning/GitVersioningPlugin.scala b/src/main/scala/com/rallyhealth/sbt/versioning/GitVersioningPlugin.scala index b6968de..3d5229b 100644 --- a/src/main/scala/com/rallyhealth/sbt/versioning/GitVersioningPlugin.scala +++ b/src/main/scala/com/rallyhealth/sbt/versioning/GitVersioningPlugin.scala @@ -152,7 +152,7 @@ object GitVersioningPlugin extends AutoPlugin { (autoFetchResult in ThisProject).value val gitVersion = gitDriver.value.calcCurrentVersion(ignoreDirty.value) - ConsoleLogger().info(s"RallyVersioningPlugin set versionFromGit=$gitVersion") + ConsoleLogger().info(s"GitVersioningPlugin set versionFromGit=$gitVersion") gitVersion }, @@ -167,7 +167,7 @@ object GitVersioningPlugin extends AutoPlugin { throw new IllegalArgumentException(msg) } - ConsoleLogger().info(s"RallyVersioningPlugin set versionOverride=$versionOverrideStr") + ConsoleLogger().info(s"GitVersioningPlugin set versionOverride=$versionOverrideStr") ver.toString } }, @@ -204,7 +204,7 @@ object GitVersioningPlugin extends AutoPlugin { } val version = verOverride.getOrElse(boundedVersionFromGit).toString - ConsoleLogger().info(s"RallyVersioningPlugin set version=$version") + ConsoleLogger().info(s"GitVersioningPlugin set version=$version") version }, @@ -214,7 +214,7 @@ object GitVersioningPlugin extends AutoPlugin { .getOrElse(throw new IllegalArgumentException(s"cannot parse version=${version.value}")) .isDirty - ConsoleLogger().info(s"RallyVersioningPlugin set isCleanRelease=${!isDirty}") + ConsoleLogger().info(s"GitVersioningPlugin set isCleanRelease=${!isDirty}") !isDirty }, diff --git a/src/sbt-test/semver/multi-project/test b/src/sbt-test/semver/multi-project/test index d5f6f69..3e1b880 100644 --- a/src/sbt-test/semver/multi-project/test +++ b/src/sbt-test/semver/multi-project/test @@ -1,4 +1,4 @@ -# Set up a git repo appease RallyVersioningPlugin and tag first version. +# Set up a git repo appease GitVersioningPlugin and tag first version. $ exec git init $ exec git add . $ exec git commit -am 'Initial commit.' diff --git a/src/sbt-test/semver/new-artifact/test b/src/sbt-test/semver/new-artifact/test index 4a37cf9..3796f3e 100644 --- a/src/sbt-test/semver/new-artifact/test +++ b/src/sbt-test/semver/new-artifact/test @@ -6,7 +6,7 @@ # "semVerEnforceAfterVersion". ########################################################################################################### -# Set up a git repo appease RallyVersioningPlugin and tag first version. +# Set up a git repo appease GitVersioningPlugin and tag first version. $ exec git init $ exec git add . $ exec git commit -am 'Initial commit.' diff --git a/src/sbt-test/semver/rename-artifact/test b/src/sbt-test/semver/rename-artifact/test index 7fed1e2..5dc43a3 100644 --- a/src/sbt-test/semver/rename-artifact/test +++ b/src/sbt-test/semver/rename-artifact/test @@ -3,7 +3,7 @@ # scenario SemVer can only be bypassed by making a MAJOR version change. ########################################################################################################### -# Set up a git repo appease RallyVersioningPlugin and tag first version. +# Set up a git repo appease GitVersioningPlugin and tag first version. $ exec git init $ exec git add . $ exec git commit -am 'Initial commit.' diff --git a/src/sbt-test/semver/tagging/test b/src/sbt-test/semver/tagging/test index b2f6519..5516e0a 100644 --- a/src/sbt-test/semver/tagging/test +++ b/src/sbt-test/semver/tagging/test @@ -2,7 +2,7 @@ # Uses "tag then publish" workflow. ########################################################################################################### -# Set up a git repo appease RallyVersioningPlugin and tag first version. +# Set up a git repo appease GitVersioningPlugin and tag first version. $ exec git init $ exec git add . $ exec git commit -am 'Initial commit.' diff --git a/src/sbt-test/versioning/fromGit/test b/src/sbt-test/versioning/fromGit/test index 1f33e52..609edb7 100644 --- a/src/sbt-test/versioning/fromGit/test +++ b/src/sbt-test/versioning/fromGit/test @@ -1,5 +1,5 @@ ############################################################################################################ -# Basic sanity tests for RallyVersioningPlugin +# Basic sanity tests for GitVersioningPlugin # Init the repo $ exec git init diff --git a/src/sbt-test/versioning/odd/test b/src/sbt-test/versioning/odd/test index 359f6aa..a3c8bcf 100644 --- a/src/sbt-test/versioning/odd/test +++ b/src/sbt-test/versioning/odd/test @@ -1,6 +1,6 @@ ############################################################################################################ -# Tests for odd behavior for RallyVersioningPlugin. Not necessarily wrong, but definitely less obvious -# to those who are not intimately familiar with all the dark magic in RallyVersioningPlugin. +# Tests for odd behavior for GitVersioningPlugin. Not necessarily wrong, but definitely less obvious +# to those who are not intimately familiar with all the dark magic in GitVersioningPlugin. # I've tried to call out the "odd" behavior with triple bang "!!!" diff --git a/src/sbt-test/versioning/tagging/test b/src/sbt-test/versioning/tagging/test index a1016d3..6131552 100644 --- a/src/sbt-test/versioning/tagging/test +++ b/src/sbt-test/versioning/tagging/test @@ -1,5 +1,5 @@ ############################################################################################################ -# Tagging tests for RallyVersioningPlugin, some sane, some pathological +# Tagging tests for GitVersioningPlugin, some sane, some pathological # Init the repo $ exec git init diff --git a/src/test/resources/scriptedOutput-example1.txt b/src/test/resources/scriptedOutput-example1.txt index 712b4ec..0cea57d 100644 --- a/src/test/resources/scriptedOutput-example1.txt +++ b/src/test/resources/scriptedOutput-example1.txt @@ -139,9 +139,9 @@ Initialized empty Git repository in /private/var/folders/vp/p4d6nc0d7bnctv6j0lgr [info] [info] Skipping fetching tags from git remotes; to enable, set the system property version.autoFetch=true [info] [ScriptedUtils] sideChannelFile: /private/var/folders/vp/p4d6nc0d7bnctv6j0lgr3ky40000gp/T/sbt_6c5b0244/sanity/scriptedOutput-1480303571457.link.txt [info] [ScriptedUtils] bufferedFile: /var/folders/vp/p4d6nc0d7bnctv6j0lgr3ky40000gp/T/scriptedOutput-2194719900698081813.log.txt -[info] [info] RallyVersioningPlugin set versionFromGit=0.0.1 -[info] [info] RallyVersioningPlugin set version=0.0.1 -[info] [info] RallyVersioningPlugin set isCleanRelease=true +[info] [info] GitVersioningPlugin set versionFromGit=0.0.1 +[info] [info] GitVersioningPlugin set version=0.0.1 +[info] [info] GitVersioningPlugin set isCleanRelease=true [info] [info] Set current project to sanity (in build file:/private/var/folders/vp/p4d6nc0d7bnctv6j0lgr3ky40000gp/T/sbt_6c5b0244/sanity/) [info] [info] [ScriptedUtils] Starting load_plugin ---------------------------- [info] [success] Total time: 0 s, completed Nov 27, 2016 10:26:22 PM @@ -152,7 +152,7 @@ Initialized empty Git repository in /private/var/folders/vp/p4d6nc0d7bnctv6j0lgr [info]  sbt.plugins.JUnitXmlReportPlugin: enabled in sanity [info]  sbt.plugins.Giter8TemplatePlugin: enabled in sanity [info]  com.rallyhealth.semver.SemVerPlugin: enabled in sanity -[info]  com.rallyhealth.versioning.RallyVersioningPlugin: enabled in sanity +[info]  com.rallyhealth.versioning.GitVersioningPlugin: enabled in sanity [info]  com.typesafe.tools.mima.plugin.MimaPlugin: enabled in sanity [info] [success] Total time: 0 s, completed Nov 27, 2016 10:26:22 PM [info] [success] Total time: 0 s, completed Nov 27, 2016 10:26:22 PM From a01215aacc77b31a8e4c0ac2e39b510ea9b83ec2 Mon Sep 17 00:00:00 2001 From: Jeff May Date: Tue, 26 Dec 2017 15:47:05 -0800 Subject: [PATCH 2/3] Fix ReadMe links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d5a8116..fc4d1f3 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,13 @@ In either case, you should now be able to add the plugin dependency to `project/ addSbtPlugin("com.rallyhealth.sbt" % "git-versioning-sbt-plugin" % "x.y.z") ``` 3. Enable the plugin and set `semVerLimit` in `build.sbt` (see - [below](https://github.com/rallyhealth/git-versioning-sbt-plugin#semverversionlimit) + [below](https://github.com/rallyhealth/git-versioning-sbt-plugin#semverlimit) for details) ```scala val example = project .enablePlugins(SemVerPlugin) - // See https://github.com/rallyhealth/git-versioning-sbt-plugin#semverversionlimit + // See https://github.com/rallyhealth/git-versioning-sbt-plugin#semverlimit .settings(semVerLimit := "x.y.z") ``` From e82e5a7d7473d50f4bc92d99eec2b060273708d8 Mon Sep 17 00:00:00 2001 From: Jeff May Date: Tue, 26 Dec 2017 15:49:41 -0800 Subject: [PATCH 3/3] Bump to version 0.0.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 8ea1483..422045d 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ sbtPlugin := true name := "git-versioning-sbt-plugin" organizationName := "Rally Health" organization := "com.rallyhealth.sbt" -version := "0.0.1" +version := "0.0.2" licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT")) bintrayOrganization := Some("rallyhealth")