]>
git.ipfire.org Git - thirdparty/dracut.git/blob - git2spec.pl
2ea74c835ddebb0ef9cbe1a3d2a8c2029d7f8a65
4 open( GIT
, 'git log --pretty=format:%H |');
6 open( GIT2
, "git tag --contains $_ |");
22 open( GIT
, 'git format-patch --no-renames -N --no-signature '.$tag.' |');
33 grep (/^ 0 files changed/, @lines);
36 use POSIX
qw(strftime);
37 my $datestr = strftime
"%Y%m%d", gmtime;
40 $tag=&last_tag
if not defined $tag;
41 my @patches=&create_patches
($tag);
42 my $num=$#patches + 2;
43 $tag=~s/[^0-9]+?([0-9]+)/$1/;
44 my $release="$num.git$datestr";
45 $release="1" if $num == 1;
49 print "Version: $tag\n";
52 print "Release: $release%{?dist}\n";
54 elsif ((/^Source0:/) || (/^Source:/)) {
58 next if filter_patch
$_;
59 print "Patch$num: $_";
68 next if filter_patch
$_;
69 print "%patch$num -p1\n";