1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-23 21:22:46 +01:00

Fix: [CI] also generate a changelog for nightlies (#13197)

This commit is contained in:
Patric Stout
2024-12-26 11:19:45 +01:00
committed by GitHub
parent c5ec55b4ed
commit ae7bd04de8

View File

@@ -125,15 +125,15 @@ jobs:
# put in their own folder. # put in their own folder.
FOLDER="${{ env.FOLDER_BRANCHES }}/${BRANCH}" FOLDER="${{ env.FOLDER_BRANCHES }}/${BRANCH}"
TRIGGER_TYPE="new-branch" TRIGGER_TYPE="new-branch"
fi
# For nightlies, use the git log of the last 7 days as changelog. # For nightlies / branches, use the git log of the last 7 days as changelog.
revdate=$(git log -1 --pretty=format:"%ci") revdate=$(git log -1 --pretty=format:"%ci")
last_week=$(date -d "$revdate -7days" +"%Y-%m-%d %H:%M") last_week=$(date -d "$revdate -7days" +"%Y-%m-%d %H:%M")
echo "## Version $(cat .version) - changes since ${last_week}" > .changelog echo "## Version $(cat .version) - changes since ${last_week}" > .changelog
echo "" >> .changelog echo "" >> .changelog
git log --oneline --after="${last_week}" >> .changelog git log --oneline --after="${last_week}" >> .changelog
fi fi
fi
mkdir -p build/bundles mkdir -p build/bundles
cp .changelog build/bundles/changelog.md cp .changelog build/bundles/changelog.md