Skip to content

Commit ac02454

Browse files
committedOct 28, 2021
cmd-list: print the config branch for each build
That makes it easier to tell what each build is if they're not tagged without something more specific.
1 parent 1b979bb commit ac02454

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/cmd-list

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ def main():
2828
# chop off the microseconds in the delta; don't need that precise
2929
print(f" Timestamp: {ts} ({str(delta).split('.')[0]} ago)")
3030
print(f" Artifacts: {' '.join(list(m['images']))}")
31+
git = m.get('coreos-assembler.container-config-git')
32+
if git:
33+
config = git['commit']
34+
if 'branch' in git:
35+
config = f"{git['branch']} ({config[:12]})"
36+
if git['dirty'] != "false":
37+
config += " (dirty)"
38+
print(f" Config: {config}")
3139
if build['id'] in tags:
3240
print(f" Tags: {' '.join(tags[build['id']])}")
3341
print()

0 commit comments

Comments
 (0)