mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
support/scripts/pkg-stats: simplify Git commit id retrieval
As suggested by Baruch Siach, using "git rev-parse HEAD" is a lot simpler than playing around with "git log" to just retrieve the commit id corresponding to the current HEAD. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
a014dc55d3
commit
ffcd34af07
@ -727,8 +727,8 @@ def __main__():
|
|||||||
else:
|
else:
|
||||||
package_list = None
|
package_list = None
|
||||||
date = datetime.datetime.utcnow()
|
date = datetime.datetime.utcnow()
|
||||||
commit = subprocess.check_output(['git', 'log', 'HEAD', '-n', '1',
|
commit = subprocess.check_output(['git', 'rev-parse',
|
||||||
'--pretty=format:%H']).splitlines()[0]
|
'HEAD']).splitlines()[0]
|
||||||
print("Build package list ...")
|
print("Build package list ...")
|
||||||
packages = get_pkglist(args.npackages, package_list)
|
packages = get_pkglist(args.npackages, package_list)
|
||||||
print("Getting package make info ...")
|
print("Getting package make info ...")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user