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

vmm: add version info #110

Merged
merged 1 commit into from
Jan 15, 2024
Merged

vmm: add version info #110

merged 1 commit into from
Jan 15, 2024

Conversation

morningtzh
Copy link
Contributor

@morningtzh morningtzh commented Jan 12, 2024

  1. Modify the args parsing method of Kuasar VMM: use clap to parse args in the args.rs file, and replace the usage of args in load_config.
  2. Add build.rs, inject build information using the built library during the build process.
  3. Add a function to print version information and build information in args.rs.
➜  sandbox git:(tzh-version) ✗ ./target/debug/cloud_hypervisor  --help    
Usage: cloud_hypervisor [OPTIONS]

Options:
  -v, --version        Version info
  -c, --config <FILE>  Config file path, only for cloud hypervisor and stratovirt
  -d, --dir <DIR>      Sandboxer working directory
  -l, --listen <FILE>  Address for sandboxer\'s server
  -h, --help           Print help

➜  sandbox git:(tzh-version) ✗ # before commit
➜  sandbox git:(tzh-version) ✗ ./target/debug/cloud_hypervisor  --version 
Version: v0.4.0-3-gecb617e-dirty
Build Time: Mon, 15 Jan 2024 07:03:25 +0000

➜  sandbox git:(tzh-version) ✗ # after commit
➜  sandbox git:(tzh-version) ✗ ./target/debug/cloud_hypervisor  --version
Version: v0.4.0-3-g6c24d1a
Build Time: Mon, 15 Jan 2024 07:30:28 +0000

@morningtzh morningtzh requested a review from a team as a code owner January 12, 2024 08:51
@morningtzh morningtzh force-pushed the tzh-version branch 2 times, most recently from 0ffe3a3 to ecb617e Compare January 12, 2024 09:15
vmm/sandbox/src/args.rs Outdated Show resolved Hide resolved
vmm/sandbox/Cargo.toml Show resolved Hide resolved
vmm/sandbox/build.rs Outdated Show resolved Hide resolved
vmm/sandbox/src/lib.rs Outdated Show resolved Hide resolved
vmm/sandbox/src/args.rs Outdated Show resolved Hide resolved
vmm/sandbox/src/args.rs Outdated Show resolved Hide resolved
@morningtzh morningtzh force-pushed the tzh-version branch 3 times, most recently from 6c24d1a to 10f1cf5 Compare January 15, 2024 07:51
Signed-off-by: MorningTZH <[email protected]>
Copy link
Member

@Burning1020 Burning1020 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Burning1020 Burning1020 left a comment

Choose a reason for hiding this comment

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

LGTM

@flyflypeng
Copy link
Member

LGTM

@Burning1020 Burning1020 merged commit 311e0ed into kuasar-io:main Jan 15, 2024
15 checks passed
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.

4 participants