Skip to content

Commit

Permalink
cicd: reverse array so commits are printed in order of creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazrius committed Mar 29, 2024
1 parent 1f2e9bc commit 948d7a3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ jobs:
run: |
echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M')"
BODY=$(git log master --since='24 hours ago' | sed -En 's/^ +?([a-z]+:\w*)/\1/p' | awk '{print "- "$0}')
echo "$BODY" >> RELEASE.md
echo "printing git log"
git log master --since='24 hours ago'
echo "printing git log with sed"
git log master --since='24 hours ago' | sed -En 's/^ +?([a-z]+:\w*)/\1/p'
echo "printing git log with sed and awk"
git log master --since='24 hours ago' | sed -En 's/^ +?([a-z]+:\w*)/\1/p' | awk '{print "- "$0}'
echo "printing array"
echo "$BODY"
# Reverse the array and print to file
echo "printing end results"
printf '%s\n' "${BODY[@]}" | tac
printf '%s\n' "${BODY[@]}" | tac > RELEASE.MD
cat RELEASE.MD
WIN_HOME=$(echo $HOME | tr '/' '\\')
WIN_HOME="${WIN_HOME:1:1}:${WIN_HOME:2:${#WIN_HOME}-1}"
WIN_HOME=${WIN_HOME^}
Expand Down

0 comments on commit 948d7a3

Please sign in to comment.