Re: Status of the forge macros?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 24, 2023 at 11:13:15AM -0400, Ben Beasley wrote:
> In your example, the forge macros simplify the spec file only because a snapshot is involved; but the forge macros put the snapshot info in the Release field, which is still permissible but deprecated[1].
> 
> Without the forge macros, the spec file would admittedly be a little more complex. I would probably do something like the following:
> 
> %global commit   791953030836d39687688a8e7f1a3e708892cfa1
> %global snapdate 20230420
> 
> Version: 1.2^%{snapdate}git%(echo '%{commit}' | cut -b -7)
> Release: 1%{?dist}

Minor comment:
  %(c=%{commit}; echo ${c:0:7})
is a bit nicer because it doesn't require 'cut', it just uses 'echo',
which is a shell builtin.

Zbyszek
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux