Slice short commit hash using only shell builtins

[skip changelog]
This commit is contained in:
Benjamin A. Beasley 2023-05-24 18:17:51 -04:00
parent a4405737ae
commit 8e716fdda8

View File

@ -5,7 +5,7 @@ Name: c4project
Summary: Useful CMake scripts
# This project has never been assigned a version. The author really intends it
# for use as a git submodule rather than for system-wide installation.
Version: 0^%{snapdate}git%(echo '%{commit}' | cut -b -7)
Version: 0^%{snapdate}git%(c='%{commit}'; echo "${c:0:7}")
Release: %autorelease
URL: https://github.com/biojppm/cmake