You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like some of the examples are a bit broken in Ch12 (also ch10).
We have git.baseVersion := "0.1"
Then in our def PreownedKittenProject we have .settings(versionWithGit:_*)
This does not work, when running sbt version we see something like 1.0-gitSha... Not 0.1-gitSha...
Also the version.properties file val content = "version=%s" format (gitHeadCommitSha.value) is just using the gitHeadCommitSha not the value from the sbt-git plugin... This gives inconsistent versions. I will agree that it makes it nicer as you dont need to reload the project on each commit to get the version.properties file updated but its a big inconsistency.
versionWithGit seems to be the way to go, so it would be nice to have this working consistently...
I think git.baseVersion := "0.1" should be a part of the settings block in the def PreownedKittenProject(name: String) block (where organization is defined)...
How to use this in the version.properties file I'm not sure... Changing to val content = "version=%s" format (version.value) will work but it wont pickup changes when committing without doing a sbt reload which is a hassle... We need some taskKey to update the version value... I'm not that far through the book so not sure where to start on this one...
The text was updated successfully, but these errors were encountered:
I am trying to use this for my builds too and find that it works sometimes.
If I load and enter version I get git.baseVersion+SHA, even though I have previously tagged versions, that I see if I enter git tag.
If I "release v#.#" and then run version I see that version. If I release V#.#+1, the tag is added to git but the jar (I am using assemly) is versioned with the first tag of the session and version also shows the first tag also.
Looks like some of the examples are a bit broken in Ch12 (also ch10).
We have
git.baseVersion := "0.1"
Then in our
def PreownedKittenProject
we have.settings(versionWithGit:_*)
This does not work, when running
sbt version
we see something like1.0-gitSha...
Not 0.1-gitSha...Also the
version.properties
fileval content = "version=%s" format (gitHeadCommitSha.value)
is just using thegitHeadCommitSha
not the value from thesbt-git
plugin... This gives inconsistent versions. I will agree that it makes it nicer as you dont need to reload the project on each commit to get theversion.properties
file updated but its a big inconsistency.versionWithGit
seems to be the way to go, so it would be nice to have this working consistently...I think
git.baseVersion := "0.1"
should be a part of the settings block in thedef PreownedKittenProject(name: String)
block (whereorganization
is defined)...How to use this in the
version.properties
file I'm not sure... Changing toval content = "version=%s" format (version.value)
will work but it wont pickup changes when committing without doing a sbt reload which is a hassle... We need sometaskKey
to update the version value... I'm not that far through the book so not sure where to start on this one...The text was updated successfully, but these errors were encountered: