git.github.io
git.github.io copied to clipboard
Automating publication of Git Rev News
It is a bit tedious to publish an edition of Git Rev news and some parts of the process could easily be automated as @dscho and perhaps others already suggested. Parts that are not automated could be documented.
Here is the process that I used to publish edition 45:
# If needed make sure we are up-to-date
git checkout master
git pull origin master
# Publish current draft
git mv rev_news/drafts/edition-45.md _posts/2018-11-21-edition-45.markdown
git commit -m "Publish rn-45 in _posts/"
# Create a draft for next edition
git cherry-pick a8d5060 # Cherry pick commit with the last draft
git mv rev_news/drafts/edition-45.md rev_news/drafts/edition-46.md
perl -pi -e 's/Edition 45/Edition 46/g' rev_news/drafts/edition-46.md
perl -pi -e 's/45th edition/46th edition/g' rev_news/drafts/edition-46.md
perl -pi -e 's/2018-11-21/2018-12-19/g' rev_news/drafts/edition-46.md
perl -pi -e 's/October 2018/November 2018/g' rev_news/drafts/edition-46.md
git commit --amend -m "Add draft for rn-46" rev_news/drafts/edition-46.md
# Push everything to actually publish
git push origin master
# Manually create an issue in GitHub for the draft of the next edition
...
# Manually check that the newly published edition appears on
# https://git.github.io/
...
# Manually announce the newly published edition on the Git mailing list
...
There is now https://github.com/chriscool/getreleases/blob/master/publish_edition.sh made from the above.
There is now https://github.com/chriscool/getreleases/blob/master/publish_edition.sh made from the above.
Thanks.
I have a couple of suggestions how to improve it, such as:
- verifying that it runs in the correct worktree by looking for a known commit,
- determining the values of
cur
,next
and the likes automatically, even determining the next publication date automatically, - making the substitution more robust by using a dedicated template rather than cherry-picking the latest (which you cannot change even if you realize that you could improve it right after pushing), and
- coalescing the many
perl
invocations into a single one.
Thanks for the suggestions!
Yeah, my plan is to improve it a little every time I will use it to publish a new edition.
More automation in https://github.com/chriscool/getreleases/commit/66cec420093167ff930d6c8d8435455cc0ad0526
Further improvements in:
- https://github.com/chriscool/getreleases/commit/9d286fbac3cd7bd09d79b7de799d77850e59a9dc
- https://github.com/chriscool/getreleases/commit/18c82e44137e236e5252a6447a9eda5f63efbb7b
- https://github.com/chriscool/getreleases/commit/cfd51be499d2d8dac11eacf572d191954700142b
@dscho with the following improvements:
- https://github.com/chriscool/getreleases/commit/d4dd351d060feeacd86503f1407fc7e7f4232cf9
- https://github.com/chriscool/getreleases/commit/29191ec9659507892dace32dbbcb78c8c7e927a6
I think all your suggestions have been implemented and we can close this issue.