Skip to content

Commit

Permalink
Fix wrong version generated in mkdocs (sbt eats last character of a h…
Browse files Browse the repository at this point in the history
…ash in snapshot)
  • Loading branch information
MateuszKubuszok committed Feb 8, 2025
1 parent 2b2eec1 commit 1db5076
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ apiUser.transformInto[User]
But don't you worry! Usually Chimney only needs your help if there is no field in the source value with a matching name
or whe the targeted type has a private constructor. Out of the box, it supports:

* conversions [between `case class`es](supported-transformations.md#into-a-case-class)
* conversions [between `case class`es](supported-transformations.md#into-a-case-class-or-pojo)
* actually, a conversion between *any* `class` and *another `class` with a public constructor*
* with [an opt-in support for Java Beans](supported-transformations.md#reading-from-bean-getters)
* conversions [between `sealed trait`s, Scala 3 `enum`s, Java `enum`s](supported-transformations.md#between-sealedenums)
Expand Down
2 changes: 2 additions & 0 deletions docs/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def define_env(env):
If git describe tells us that this is NOT a git tag but git tag + some offset, we need to add -SNAPSHOT to match sbt
"""
if re.compile('.+-[0-9]+-g[0-9a-z]{8}').match(chimney_version_string):
chimney_version_string = chimney_version_string[0:-1] + '-SNAPSHOT'
elif re.compile('.+-[0-9]+-[0-9a-z]{8}').match(chimney_version_string):
chimney_version_string = chimney_version_string + '-SNAPSHOT'

@env.macro
Expand Down

0 comments on commit 1db5076

Please sign in to comment.