[feat] CLI command for versioning
Describe the problem
We use the very useful Tauri github action to auto build and draft release using semantic versioning.
It's really easy for me to forget a step when manually bumping versions. A normal flow looks lile
npm version (major | minor | patch)cd src-tauricargo bump (major | minor | patch)- manually edit
tauri.config.json git commit --amend
Describe the solution you'd like
It'd be very nice to run npm run tauri version (major | minor | patch) and have the desired results!
Alternatives considered
It's quite possible I'm over-complicating things and half of this is no longer necessary in post v1.x.x world
Additional context
No response
This would be a fun feature, but what's the use case for having 3 versions? Like do you need the all 3? If so, for what?
I guess I just like keeping all the numbers in the configs in sync 😄 In my mind I guess it could be misleading to see different numbers in different configs.
tauri.config.json is the only one with any real effect here, so I suppose if the Tauri CLI handles just that then it's a great step!
tauri.config.json already supports specifying a path to a package.json file as the version, and it will get the version number from the package.json
Could tauri.config.json also read from a Cargo.toml? That would be great
@sinistersnare If you don't set any version (or path) in tauri.conf.json it will fall back to the version in Cargo.toml. Same for the name btw.
Oh nice! This behavior isnt mentioned in the docs. Thanks for saying!
Hi, are you happy with the mentioned behaviour for your use case or do you think a version command would be helpful?
Can you assign me to this?
@gorentbarak, you can work on something for this and then mention this issue in a draft pr.
I made a tool to achieve that , see tauri-version. And I have used it to release a version of my own tauri-app, see example in lethal-company-mods-copier v0.0.5 release
I made a tool to achieve that , see tauri-version. And I have used it to release a version of my own tauri-app, see example in lethal-company-mods-copier v0.0.5 release
tauri.conf.json + Cargo.toml + package.json
npx tauri-version patch:0.0.2->0.0.3npx tauri-version patch -m release: v%s: commit with message "release: v0.0.3" which default if "0.0.3"
I'm closing this issue to avoid noise because:
@sinistersnare If you don't set any version (or path) in tauri.conf.json it will fall back to the version in Cargo.toml. Same for the name btw.
This fits my use case. Thanks!