Skip to content

Commit 1e5676a

Browse files
committed
Build: Use unannotated Git tags as version numbers
If a Git tag was created with `git tag $version`, it would not be considered by `git describe`. Add the `--tags` parameter to fix this. See also https://git-scm.com/docs/git-describe.
1 parent 5f48fa5 commit 1e5676a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.drone.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ steps:
77
commands:
88
- apk add --no-cache git
99
- git fetch --tags
10-
- git describe
11-
- git describe > SEED
12-
- echo -n $(git describe),latest > .tags
10+
- git describe --tags
11+
- git describe --tags > SEED
12+
- echo -n $(git describe --tags),latest > .tags
1313
- name: test
1414
image: alpine:3.8
1515
commands:

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def parseVersion(file: Path): Option[String] =
88
.find(_.nonEmpty).map(_.trim)
99

1010
def seedVersion = parseVersion(Paths.get("SEED")) // CI
11-
.getOrElse(Seq("git", "describe").!!.trim) // Local development
11+
.getOrElse(Seq("git", "describe", "--tags").!!.trim) // Local development
1212
def bloopVersion = parseVersion(Paths.get("BLOOP")).get
1313
def bloopCoursierVersion = parseVersion(Paths.get("COURSIER")).get
1414

0 commit comments

Comments
 (0)