Comments (5)
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
}
from sbt-git.
Thanks, I will look at doing something like that.
from sbt-git.
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 tag
keeps sbt in sync for future commands:
> tag 0.1.0
However, the version is still not refreshed for local changes until a new tag is made. In this case, a release
command that includes the refresh
command as suggested by @jsuereth may be better.
from sbt-git.
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
}
}
from sbt-git.
I would love this too. But version isn't going to become a task.
from sbt-git.
Related Issues (20)
- sbt-git seems abandoned HOT 6
- Volunteer needed to add CI using GitHub Actions
- Volunteer needed to add publishing via sbt-ci-release
- Drop sbt 0.13 from the crossbuild HOT 7
- gitRemoteRepo is not defined
- Multiple labeled tags leads to NumberFormatException during project load HOT 3
- Wrong output in generated `scmInfo` HOT 2
- Allow different tag patterns for multi-module projects using git describe
- Move to com.github.sbt? HOT 9
- Enable Scala Steward in this repo HOT 2
- Rename `master` to `main`
- Update repo secrets for Sonatype org change HOT 2
- Require Java 11 HOT 5
- Plan next release HOT 13
- Change package to `com.github.sbt.git`? HOT 6
- Typo in README: `gitTagToVersionNumberSetting`
- No version after 1.0.0 works HOT 2
- sbt-git v2.0.1: wrong version value returned
- sbt-git v2.0.1 disables all ouput from git commands to sbt logs HOT 5
- sbt-git v2.0.1: version number from "git describe" is not correct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-git.