Skip to content

Commit

Permalink
Build on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Oct 10, 2021
1 parent 48d6b7c commit 8f15ddd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI
on:
push:
tags:
- '*'
branches:
- main
pull_request:
Expand Down
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ lazy val V = new {
}

ThisBuild / organization := "com.twitter.multiversion"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / version := {
val snapshotV = "0.1.0-SNAPSHOT"
val old = (ThisBuild / version).value
(sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version")) match {
case Some(v) => v
case _ =>
if ((ThisBuild / isSnapshot).value) snapshotV
else old
}
}
ThisBuild / homepage := Some(url("https://github.com/twitter/bazel-multiversion"))
ThisBuild / licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.19")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")

0 comments on commit 8f15ddd

Please sign in to comment.