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

Add version command to show version info #78

Merged
merged 5 commits into from
Aug 16, 2022
Merged

Conversation

silentEAG
Copy link
Collaborator

Now it can show the Cargo pkg version and the last commit id with date and branch. #75

@ghost
Copy link

ghost commented Aug 15, 2022

Review on Crocodile

@KernelErr KernelErr requested a review from Folyd August 15, 2022 15:23
Copy link
Member

@Folyd Folyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good to me overall. Just some suggestions.

src/serve.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
build.rs Outdated Show resolved Hide resolved
build.rs Outdated
println!("cargo:rustc-env=GIT_BRANCH={}", branch);

// Read date from current build branch.
let date_binding = run(&["git", "show", &branch, "--pretty=format:\"%ci %cr\""]).unwrap();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving a brief output comment is a good practice to help others grasp the code quickly.
Such as:

// Here is an example output:
//
// 2022-08-06 18:39:39 +02009 days ago
// ...
let date_binding = run(&["git", "show", &branch, "--pretty=format:\"%ci %cr\""]).unwrap();

@silentEAG
Copy link
Collaborator Author

Thanks for guiding! I have tried to improve them!

@Folyd Folyd merged commit accdec5 into zineland:master Aug 16, 2022
@Folyd Folyd mentioned this pull request Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants