update workflow to correct errors
This commit is contained in:
@@ -121,14 +121,19 @@ jobs:
|
|||||||
changelog="${{ matrix.version }}/CHANGES.md"
|
changelog="${{ matrix.version }}/CHANGES.md"
|
||||||
mkdir -p "$(dirname "$changelog")"
|
mkdir -p "$(dirname "$changelog")"
|
||||||
touch "$changelog"
|
touch "$changelog"
|
||||||
|
|
||||||
infofile="${{ matrix.version }}/build-info.json"
|
infofile="${{ matrix.version }}/build-info.json"
|
||||||
last_commit=""
|
last_commit=""
|
||||||
[ -f "$infofile" ] && last_commit=$(jq -r '.commit' "$infofile")
|
if [ -f "$infofile" ]; then
|
||||||
|
last_commit=$(jq -r '.commit' "$infofile")
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "\n## $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$changelog"
|
echo -e "\n## $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$changelog"
|
||||||
if [ -n "$last_commit" ]; then
|
if [ -n "$last_commit" ]; then
|
||||||
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog"
|
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog"
|
||||||
else
|
else
|
||||||
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
|
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Commit and push changelog
|
- name: Commit and push changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user