Commit aa0e314
Extract Git info at build time only if possible
The build system tries to extract some Git build details (e.g. branch
and SHA). The problem is that it assumes that both 'git' is installed,
and that the sources are in a Git repository: while this is true during
a Git build, they are both not true when building from release tarballs
(e.g. as done by distributions).
Hence, manually search for 'git' and that the current sources are a Git
repository:
- if both are valid, extract the build details as done so far
- if neither is available, still try to use '.tag' for the SHA, setting
the value for the branch as well to it1 parent f2f34b5 commit aa0e314
1 file changed
+22
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| 55 | + | |
42 | 56 | | |
43 | 57 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
0 commit comments