-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If using interactive sbt console, version only gets regenerated on reload #31
Comments
No :(. version in sbt is a "Setting" which means it's only generated on load/reload. I recommend making a release script which will ensure a reload/cleaned project. commands += Command.command("release") { state =>
"reload" :: "test" :: "publishSigned" :: state
} |
Thanks, I will look at doing something like that. |
I would love to have this automatically be updated too. In the meantime, instead of using git to directly tag the version, I use sbt to tag and refresh the project. This way sbt will grab then grab the most recent version. commands += Command.single("tag"){case (state,versionTag) =>
println(s"Commiting a git annotated tag of v$versionTag, and refreshing the project ")
s"git tag -a -m v$versionTag v$versionTag" :: "reload" :: state
} Then using the interactive sbt console to make a
However, the version is still not refreshed for local changes until a new tag is made. In this case, a |
The following commands, which override the default task, work well for me. Command.command("package") {
state => {
println("==== Reload & package ====")
"reload" :: "compile:package" :: state
}
} Command.command("assembly") {
state => {
println("==== Reload & assembly ====")
"reload" :: "*:assembly" :: state
}
} |
I would love this too. But version isn't going to become a task. |
I tend to work in an interactive sbt console, however, this does not regenerate the version number unless you reload.
Is there a way to have these regenerated whenever a task is run?
The text was updated successfully, but these errors were encountered: