Generate the short commit hash using shell builtins

[skip changelog]
This commit is contained in:
Benjamin A. Beasley 2023-05-26 09:17:57 -04:00
parent b0c5c6bad2
commit c2e8ea77b2

View File

@ -22,7 +22,7 @@ Name: stb
# collection is not, and there are no releases. See: # collection is not, and there are no releases. See:
# https://github.com/nothings/stb/issues/359 # https://github.com/nothings/stb/issues/359
# https://github.com/nothings/stb/issues/1101 # https://github.com/nothings/stb/issues/1101
%global snapinfo ^%{snapdate}git%(echo '%{commit}' | cut -b -7) %global snapinfo ^%{snapdate}git%(c='%{commit}'; echo "${c:0:7}")
Version: 0%{snapinfo} Version: 0%{snapinfo}
Release: %autorelease -p Release: %autorelease -p
Summary: Single-file public domain libraries for C/C++ Summary: Single-file public domain libraries for C/C++