Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add git rev to nix pkg version #206

Merged
merged 1 commit into from
Oct 16, 2023
Merged

chore: add git rev to nix pkg version #206

merged 1 commit into from
Oct 16, 2023

Conversation

XYenon
Copy link
Contributor

@XYenon XYenon commented Sep 22, 2023

No description provided.

@sxyazi
Copy link
Owner

sxyazi commented Oct 7, 2023

Hey @teto, I've checked the context of this PR. Does this PR work for you? If so, I will give it a merge. ❤️️

@teto
Copy link

teto commented Oct 7, 2023

so right now it prints the whole rev, so you lose the main version number, I prefer nix's way https://github.com/NixOS/nix/blob/c29b8ba142a0650d1182ca838ddc1b2d273dcd2a/flake.nix#L17 which rends for instance as nix-internal-api-docs-2.19.0pre20231006_dirty

@XYenon
Copy link
Contributor Author

XYenon commented Oct 8, 2023

Is there any way to get yazi version?

@sxyazi
Copy link
Owner

sxyazi commented Oct 8, 2023

Yazi uses workspaces and involves multiple crates, I couldn't find a variable to get a specific crate version during cargo build. So... I manually modified the version text in the --help before Yazi's release. Yeah, it's just a prompt 🤣

I'll ask others how they handle multiple crate versions later ;)

@XYenon
Copy link
Contributor Author

XYenon commented Oct 8, 2023

I can get version by builtins.match ''.*#\[command\(version[[:space:]]+=[[:space:]]+"([\.0-9]+)"\)].*'' (builtins.readFile ./config/src/boot/boot.rs), but it's too tricky.

image

@sxyazi
Copy link
Owner

sxyazi commented Oct 16, 2023

I couldn't find a unified approach, so I decided to update the versions of all crates. I created a simple script to get this done.

Currently, you can retrieve the Yazi version from the Cargo.toml of any crate, it's recommended to use app/Cargo.toml, as it serves as the entry for the app.

@XYenon XYenon marked this pull request as ready for review October 16, 2023 06:12
@sxyazi
Copy link
Owner

sxyazi commented Oct 16, 2023

Thank you a lot!!

@sxyazi sxyazi merged commit 952c300 into sxyazi:main Oct 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants