Skip to content

slivkamiro/sbt-calver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-calver

sbt-calver is an sbt plugin that automatically sets version of your project to calver format.

Inpired by:

Setup

Add this to your sbt build plugins:

addSbtPlugin("io.github.slivkamiro" % "sbt-calver" % "x.y.z")

Supported configuration options:

  • versionFormat - changes how the date is formatted in version , defaults to YY.MM which produces version like YY.MM.patch

Assuming default versionFormat your version will be set to:

Current Date Tag Dist HEAD SHA dirty version description
2023-07-11 <none> - 0123abc no 23.07.1-0123abc untagged repository
2023-07-11 <none> - 0123abc yes 23.07.1-0123abc-20230711-1030 uncomitted changes on untagged repository
2023-07-11 23.06.1 0 - no 23.07.1 at the tag at different date - no code changes needed to change version
2023-07-11 23.06.1 - 0123abc yes 23.07.1-0123abc-20230811-1030 uncomitted changes at different date
2023-07-11 23.06.1 1 0123abc no 23.07.1-0123abc ahead of master at different date
2023-07-11 23.07.1 0 - no 23.07.1 at the tag
2023-07-11 23.07.1 - 0123abc yes 23.07.2-0123abc-20230711-1030 uncomitted changes
2023-07-11 23.07.1 1 0123abc no 23.07.2-0123abc ahead of master

Where:

  • tag means what is the latest tag (relative to HEAD)
  • dist means the distance of the HEAD commit from the tag
  • dirty refers to whether there are local changes in the git repo

About

calendar versioning for your sbt scala projects

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages