Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Platform-independent core collection
Commits
2d92df5d
Commit
2d92df5d
authored
May 06, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gen_buildinfo.py: add comments.
parent
b7b7485b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
gen_buildinfo.py
tools/gen_buildinfo.py
+6
-0
No files found.
tools/gen_buildinfo.py
View file @
2d92df5d
...
...
@@ -3,11 +3,16 @@
with
open
(
"buildinfo_pkg.vhd"
,
"w"
)
as
f
:
import
subprocess
import
time
# Extract current commit id.
try
:
commitid
=
subprocess
.
check_output
(
[
"git"
,
"log"
,
"-1"
,
"--format=
%
H"
])
.
decode
()
.
strip
()
except
:
commitid
=
"unknown"
# Extract current tag + dirty indicator.
# It is not sure if the definition of dirty is stable across all git versions.
try
:
tag
=
subprocess
.
check_output
(
[
"git"
,
"describe"
,
"--dirty"
,
"--always"
])
.
decode
()
.
strip
()
...
...
@@ -18,6 +23,7 @@ with open("buildinfo_pkg.vhd", "w") as f:
except
:
tag
=
'unknown'
dirty
=
"-??"
try
:
userid
=
subprocess
.
check_output
(
[
"git"
,
"config"
,
"--get"
,
"user.name"
])
.
decode
()
.
strip
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment