From 8e716fdda86aba778c72ba2bf76486d0d8b5fd1e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 24 May 2023 18:17:51 -0400 Subject: [PATCH] Slice short commit hash using only shell builtins [skip changelog] --- c4project.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c4project.spec b/c4project.spec index cdfb3f7..5f48dcb 100644 --- a/c4project.spec +++ b/c4project.spec @@ -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