We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1d44e7 commit 9297271Copy full SHA for 9297271
docs/buildzri/reference.md
@@ -157,6 +157,24 @@ Python code snippet.
157
158
Shortname of the `BZ_ARCHL` value. i.e.,: This variable will return `x64` instead of `amd64` or `x86_64`.
159
160
+### `BZ_COMMIT`
161
+
162
+The latest commit hash of the Git repository. This value is extracted by using the following Git command via
163
+the Python script:
164
165
+```bash
166
+git log -n 1 main --pretty=format:"%H"
167
+```
168
169
+Example usage:
170
171
+```json
172
+"definitions": {
173
+ "*": [
174
+ "PROGRAM_COMMIT=\\\"${BZ_COMMIT}\\\""
175
+ ],
176
177
178
## Cross-platform definitions
179
180
BuildZri is a cross-platform C/C++ build tool, so how to define configuration values for each operating system?
0 commit comments