This is an automated email from the ASF dual-hosted git repository. rotty3000 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-jax-rs-whiteboard.git
commit 1986c026af124877b640d7cfb7b00fc7d37c1d08 Author: Raymond Auge <rotty3...@apache.org> AuthorDate: Thu Apr 8 12:00:23 2021 -0400 use latest changelog.sh script Signed-off-by: Raymond Auge <rotty3...@apache.org> --- changelog.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/changelog.sh b/changelog.sh index 4ab4889..12c5743 100755 --- a/changelog.sh +++ b/changelog.sh @@ -16,13 +16,29 @@ # specific language governing permissions and limitations # under the License. +############################################################################### +# In most cases just execute ./changelog.sh should suffice. +# +# To tune commiter names/remove dups, adjust the .mailmap file +# (see https://git-scm.com/docs/gitmailmap) +############################################################################### + TAG_SEARCH= WORK_DIR=. CHANGELOG=${WORK_DIR}/changelog.md -########################################################################################## -############# Do not edit below ########################################################## -########################################################################################## +############################################################################### +############# Do not edit below ############################################### +############################################################################### + +# collect all the tags that match our pattern and reverse the order +ALL_TAGS=( $(git tag -l $TAG_SEARCH | xargs -n 1 | tac) ) +PREVIOUS_TAG="${ALL_TAGS[0]}" +TAGS=${ALL_TAGS[@]:1} + +if [ -f $CHANGELOG ]; then + UPDATE=$PREVIOUS_TAG +fi while (( "$#" )); do case "$1" in @@ -45,12 +61,7 @@ while (( "$#" )); do esac done -# collect all the tags that match our pattern and reverse the order -ALL_TAGS=( $(git tag -l $TAG_SEARCH | xargs -n 1 | tac) ) -PREVIOUS_TAG="${ALL_TAGS[0]}" -TAGS=${ALL_TAGS[@]:1} - -if [ "$UPDATEx" != "x" ]; then +if [ -v UPDATE ]; then printf "Updating $CHANGELOG\n" # update the file if asked (appends to head of file) @@ -65,6 +76,8 @@ if [ "$UPDATEx" != "x" ]; then # swap the changelog for a temp file ORIGINAL_FILE=$CHANGELOG CHANGELOG="$CHANGELOG.tmp" +else + printf "Creating $CHANGELOG\n" fi # create the file if it doesn't exist @@ -83,7 +96,7 @@ for tag in $TAGS; do PREVIOUS_TAG=$tag done -if [ "$UPDATEx" != "x" ]; then +if [ -v UPDATE ]; then # append the changelog to the end of temp cat $ORIGINAL_FILE >> $CHANGELOG