Merge branch 'zesterer/git-gc-before-tag-push' into 'master'

Perform a cleanup before publishing a tag

See merge request veloren/veloren!4201
This commit is contained in:
Joshua Barretto 2023-11-30 10:59:42 +00:00
commit 8d35450d3f

View File

@ -43,6 +43,8 @@ gittag:
- git remote set-url origin https://veloren-bot:${GITLAB_TOKEN_WRITE}@${CI_PROJECT_URL:8}
- |
if [[ ! "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then
git reflog expire --expire=now --all;
git gc --prune=now;
git fetch;
git tag -a "${SCHEDULE_CADENCE}" -m '' -f;
git push origin "${SCHEDULE_CADENCE}" -f || echo "failed pushed, trying again" && sleep 5 && git status && git fsck && git push origin "${SCHEDULE_CADENCE}" -f;