]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
refactor(Makefile): improve AUTHORS and CONTRIBUTORS targets
authorHenrik Gombos <henrik99999@gmail.com>
Thu, 13 Jul 2023 18:43:46 +0000 (14:43 -0400)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 26 Jul 2023 11:27:13 +0000 (07:27 -0400)
Make make rules more generic to be able to use them not just in
manual release process but also in CI release process.

Makefile
tools/release.sh

index 5fd939564859cb7d359a9872d786c1fbb431fcea..0e7a101b5a21b92759492c3fb2103472c756ba6e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -300,7 +300,7 @@ efi: all
        @echo wrote linux-$(KVERSION).efi
 
 AUTHORS:
-       git shortlog  --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo $$rest;done > AUTHORS
+       @git log | git shortlog --numbered --summary -e | while read -r a rest || [ -n "$$rest" ]; do echo "$$rest"; done > AUTHORS
 
 CONTRIBUTORS:
-       @git shortlog $(DRACUT_MAIN_VERSION).. --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo "- $$rest";done
+       @git log | git shortlog $(DRACUT_MAIN_VERSION).. --numbered --summary -e | while read -r a rest || [ -n "$$rest" ]; do echo "- $$rest"; done
index f8f78f2ed2de0d015be3af538eb5792fb5acbe8f..3af681596eadf6889e416a6fadae160acc9aac0b 100755 (executable)
@@ -1,14 +1,11 @@
 #!/bin/bash
 
-LAST_VERSION=$(git describe --abbrev=0 --tags --always 2> /dev/null)
-
 # CONTRIBUTORS
 printf "#### Contributors\n\n" > CONTRIBUTORS.md
-git log | git shortlog "$LAST_VERSION.." --numbered --summary -e | while read -r a rest || [ -n "$rest" ]; do echo "- $rest"; done >> CONTRIBUTORS.md
+make CONTRIBUTORS >> CONTRIBUTORS.md
 
 # Update AUTHORS
-# shellcheck disable=SC2034
-git log | git shortlog --numbered --summary -e | while read -r a rest || [ -n "$rest" ]; do echo "$rest"; done > AUTHORS
+make AUTHORS
 
 # Update NEWS.md
 cargo install clog-cli