Use version from env! macro (#37)
This saves us from having to manually keep the version string in app.rs up to date, so we can also drop that check from the publish recipe. Fixes #36
This commit is contained in:
parent
5b3ef9f11a
commit
c775828d3c
3
justfile
3
justfile
@ -21,14 +21,13 @@ version = `sed -En 's/version = "([^"]+)"/\1/p' Cargo.toml`
|
||||
publish: clippy build
|
||||
git branch | grep '* master'
|
||||
git diff --no-ext-diff --quiet --exit-code
|
||||
grep 'version("{{version}}")' src/app.rs
|
||||
git co -b v{{version}}
|
||||
git push github
|
||||
cargo publish
|
||||
git tag -a "v{{version}}" -m "v{{version}}"
|
||||
git push github --tags
|
||||
git push origin --tags
|
||||
@echo 'Remember to merge v{{version}} branch on GitHub!'
|
||||
@echo 'Remember to merge the v{{version}} branch on GitHub!'
|
||||
|
||||
clippy:
|
||||
rustup run nightly cargo clippy
|
||||
|
@ -23,7 +23,7 @@ macro_rules! die {
|
||||
|
||||
pub fn app() {
|
||||
let matches = App::new("just")
|
||||
.version("0.2.16")
|
||||
.version(concat!("v", env!("CARGO_PKG_VERSION")))
|
||||
.author("Casey Rodarmor <casey@rodarmor.com>")
|
||||
.about("Just a command runner - https://github.com/casey/just")
|
||||
.setting(AppSettings::ColoredHelp)
|
||||
|
Loading…
Reference in New Issue
Block a user