-
Notifications
You must be signed in to change notification settings - Fork 17
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.h to store the released version #87
Comments
Template for // THIS FILE IS AUTOMATICALLY GENERATED/UPDATED DURING BUILD.
// DO NOT EDIT THIS MANUALLY UNLESS YOU KNOW WHAT YOU'RE DOING!
#ifndef __VERSION_H__
#define __VERSION_H__
#define VERSION "x.y.z"
#endif // __VERSION_H__
// Could be more macros if required e.g. BRANCH, BUILD_TYPE, etc.
// THIS FILE IS AUTOMATICALLY GENERATED/UPDATED DURING BUILD.
// DO NOT EDIT THIS MANUALLY UNLESS YOU KNOW WHAT YOU'RE DOING!
#pragma once
#define VERSION "x.y.z" |
OK. Using this approach, how would the ci.yml script assign a value to TAG, if it isn't hardcoded? |
Read the version from the The existing version itself would be used for a PR or direct commit. |
UPDATE In addition, if the source code is downloaded via Code > Download ZIP button or from a release e.g. https://github.com/liquidaty/zsv/archive/refs/tags/v0.3.8-alpha.zip, after build/install, the |
Currently, there's no version file in the codebase.
The version is extracted using
git
command and used as a compile time macroVERSION
wherever needed.Also, the CI workflow is being updated with the historical released version. See:
zsv/.github/workflows/ci.yml
Line 26 in dab4873
Instead of hardcoding the released version as
TAG
in the CI, it is suggested to use aversion.h
header file as the default place to store version information e.g. version, branch, date, etc.The text was updated successfully, but these errors were encountered: