PKUHPC / CraneSched

A High Performance HPC and Cloud Computing Fused Job Scheduling System
Other
71 stars 15 forks source link

feat: Add version at compile time #293

Closed Nativu5 closed 2 months ago

Nativu5 commented 2 months ago

This PR addresses the maintenance of the version number.

Typically, the Git repository does not include a VERSION file; it is only created during a release. When there is no VERSION file in the repository, the --version command will display the hash of the latest Git commit. Our version retrieval logic should follow these steps:

  1. If a VERSION file exists, use the version number from the VERSION file.
  2. If there is no VERSION file, use the Git commit hash.
  3. If not in a Git repository, display "Unknown".