Skip to content
This repository has been archived by the owner on Nov 16, 2017. It is now read-only.

Commit

Permalink
"com.typesafe.sbt" % "sbt-git" % "0.6.1"
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Feb 15, 2015
1 parent a65c206 commit 70d3353
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
15 changes: 15 additions & 0 deletions LICENSE
@@ -0,0 +1,15 @@
This software is licensed under the Apache 2 license, quoted below.

Copyright 2012-2013 Typesafe Inc. [http://www.typesafe.com]

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

[http://www.apache.org/licenses/LICENSE-2.0]

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
4 changes: 4 additions & 0 deletions README.md
@@ -0,0 +1,4 @@
sbt-houserules
==============

sbt-houserules is a house rules plugin for sbt modules.
7 changes: 5 additions & 2 deletions build.sbt
Expand Up @@ -4,8 +4,11 @@ lazy val commonSettings = Seq(
)

lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0"): _*).
settings(
commonSettings ++
addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0") ++
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.6.1")
: _*).
settings(
sbtPlugin := true,
name := "sbt-houserules"
Expand Down
22 changes: 22 additions & 0 deletions src/main/scala/sbt/houserules/GitVersionPlugin.scala
@@ -0,0 +1,22 @@
package sbt
package houserules

import sbt._
import Keys._
import com.typesafe.sbt.SbtGit._

object GitVersionPlugin extends AutoPlugin {
override def requires = plugins.JvmPlugin
override def trigger = allRequirements

override def buildSettings: Seq[Def.Setting[_]] = baseBuildSettings

lazy val baseBuildSettings: Seq[Setting[_]] = versionWithGit ++ Seq(
isSnapshot := true,
version := {
val old = version.value
if (isSnapshot.value) old
else git.baseVersion.value
}
)
}

0 comments on commit 70d3353

Please sign in to comment.