astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

[bug] binary (`typstfmt`) version isn't updated with project (`Cargo.toml`) version #75

Closed Andrew15-5 closed 1 year ago

Andrew15-5 commented 1 year ago

Please, fix this line: https://github.com/astrale-sharp/typstfmt/blob/578d39fb304020d0c26118e4eeab272868c9d525/src/main.rs#L11

https://github.com/astrale-sharp/typstfmt/blob/578d39fb304020d0c26118e4eeab272868c9d525/Cargo.toml#L6

P.S. I don't know if you are aware, but (probably) if version in Cargo.toml isn't changed, then to upgrade program you have to use --force cargo option. So if (at least) a new feature arrives, you should update project version (probably a minor/beta part) + binary version (there is probably have to be some way to automatically embed current version from Cargo.toml).

Andrew15-5 commented 1 year ago

I think I saw somewhere a commit hash (short) was appended to the end of the version. This could be very useful before stable version.

astrale-sharp commented 1 year ago

yup, thanks!

astrale-sharp commented 1 year ago

For now I'm doing this manually, If someone has a tip for automating it, I'll take it! (If it becomes old, I'll just read and parse the cargo.toml and a git file)

Andrew15-5 commented 1 year ago

What about crates.io binary? Will it be updated?

astrale-sharp commented 1 year ago

Not till typst publish it's version to crates.io, the current published version is empty for this reason,