From 57c68f07be2d4333d72e83287bdcccdb1759ec90 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 26 May 2023 09:17:57 -0400 Subject: [PATCH] Generate the short commit hash using shell builtins [skip changelog] --- stb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb.spec b/stb.spec index 6d93607..3d92d8e 100644 --- a/stb.spec +++ b/stb.spec @@ -22,7 +22,7 @@ Name: stb # collection is not, and there are no releases. See: # https://github.com/nothings/stb/issues/359 # 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} Release: %autorelease -p Summary: Single-file public domain libraries for C/C++