X-Git-Url: http://git.annexia.org/?p=goals.git;a=blobdiff_plain;f=stdlib%2Ffedora.gl;fp=stdlib%2Ffedora.gl;h=5dca4d908250e82250631ac908ff7daa00b0a727;hp=f4106bc886238ee39221ae45ef89eb49348f5aa3;hb=dc1c16833922b20e6949058a3813a595bb89194b;hpb=4f3f374e059fd46d40f3058c4e65e63aa4ac56cb diff --git a/stdlib/fedora.gl b/stdlib/fedora.gl index f4106bc..5dca4d9 100644 --- a/stdlib/fedora.gl +++ b/stdlib/fedora.gl @@ -111,21 +111,33 @@ is-koji-built ("%pkg") : # would need to be corrected/integrated by hand. git pull - # If we're not building for Rawhide then we must use the rightmost - # (-r) flag so there's an upgrade path to Rawhide. - rightmost= - if test %fedora-branch != "rawhide"; then rightmost=-r; fi - - # If the specfile doesn't have the magic string then add - # that now. - if ! grep -sq %fedora-rebuild-name $specfile; then - rpmdev-bumpspec -c "- "%fedora-rebuild-name $rightmost *.spec + # Add the new commit. + if ! grep -sq "^%%autochangelog" $specfile; then + # If we're not building for Rawhide then we must use the + # rpmdev-bumpspec rightmost (-r) flag so there's an upgrade + # path to Rawhide. + rightmost= + if test %fedora-branch != "rawhide"; then rightmost=-r; fi + + # If the specfile doesn't have the magic string then add + # that now. + if ! grep -sq %fedora-rebuild-name $specfile; then + rpmdev-bumpspec -c "- "%fedora-rebuild-name $rightmost *.spec + else + rpmdev-bumpspec -c "- Bump release and rebuild" $rightmost *.spec + fi + + fedpkg commit -c else - rpmdev-bumpspec -c "- Bump release and rebuild." $rightmost *.spec + # Using autochangelog. + if ! git log | grep -sq %fedora-rebuild-name; then + git commit --allow-empty -m %fedora-rebuild-name + else + git commit --allow-empty -m "Bump release and rebuild" + fi fi - # Commit and push the change. - fedpkg commit -c + # Push the new commit. fedpkg push # Do the Koji build in the side tag.