Skip to content

Commit

Permalink
refactor(Makefile): improve AUTHORS and CONTRIBUTORS targets
Browse files Browse the repository at this point in the history
Make make rules more generic to be able to use them not just in
manual release process but also in CI release process.
  • Loading branch information
Henrik66 committed Jul 13, 2023
1 parent 81d78c4 commit 5d4ed2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 2 additions & 5 deletions tools/release.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5d4ed2a

Please sign in to comment.