Comments (4)
Awesome, all great suggestions. Thanks a bunch! Implemented and merged in PR #37.
I elected to go with:
.version(concat!("v", env!("CARGO_PKG_VERSION"))
In order to bring the nicer looking crate_version!
into scope, I would need a #[macro_use]
above extern crate clap
in app.rs
.
However, #[macro_use]
is only allowed in the crate root, which is lib.rs
instead of app.rs
. I would rather keep the crate declaration in app.rs
, since that's the only place it's used, thus why I went with the less attractive version.
from just.
clap supports this by using the crate_version!
macro.
A common thing to do is:
.version(concat!("v", crate_version!())
from just.
Hey, that looks even better, I'll have to use it
from just.
Another nice thing is that this makes your publish command simpler
from just.
Related Issues (20)
- Feature request: include a descriptive paragraph when listing the behaviour of a Justfile HOT 3
- Feature request: functions to get XDG base directories (home, config, etc)
- Recipe ignored when to run multi recipes with module HOT 2
- ability to format imported files
- "error: Variable `project_name` has multiple definitions" when importing justfiles HOT 5
- Sharing `just` arguments between invocations HOT 4
- Error function not working as intended HOT 4
- Strange - old version of just appearing HOT 2
- Conditionals inside recipe body based on arguments and preview when confirm attribute is set HOT 3
- `absolute_path()` returns backslashes on windows in git bash HOT 1
- Setting to always use `/` separate paths on windows HOT 1
- Add support for importing all justfiles in a directory HOT 3
- Install curl command does not work with 1.23.0 HOT 1
- Multiple use of the same import is detected as circular
- Add module() and module_directory() functions
- Allow dependencies to be defined over multiple lines with `\` HOT 2
- List available recipes as a graph or tree HOT 3
- Allow using arbitrary expressions in confirmation prompt.
- "::" module path separator complicates completion in Bash HOT 6
- realpath in addition to clean HOT 5
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 just.