git.github.io icon indicating copy to clipboard operation
git.github.io copied to clipboard

Automating publication of Git Rev News

Open chriscool opened this issue 7 years ago • 7 comments

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.

chriscool avatar Dec 20 '17 17:12 chriscool

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
...


chriscool avatar Nov 21 '18 14:11 chriscool

There is now https://github.com/chriscool/getreleases/blob/master/publish_edition.sh made from the above.

chriscool avatar Dec 20 '18 00:12 chriscool

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.

dscho avatar Dec 21 '18 11:12 dscho

Thanks for the suggestions!

Yeah, my plan is to improve it a little every time I will use it to publish a new edition.

chriscool avatar Dec 21 '18 14:12 chriscool

More automation in https://github.com/chriscool/getreleases/commit/66cec420093167ff930d6c8d8435455cc0ad0526

chriscool avatar Jan 23 '19 13:01 chriscool

Further improvements in:

  • https://github.com/chriscool/getreleases/commit/9d286fbac3cd7bd09d79b7de799d77850e59a9dc
  • https://github.com/chriscool/getreleases/commit/18c82e44137e236e5252a6447a9eda5f63efbb7b
  • https://github.com/chriscool/getreleases/commit/cfd51be499d2d8dac11eacf572d191954700142b

chriscool avatar Feb 27 '19 13:02 chriscool

@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.

chriscool avatar Mar 17 '19 00:03 chriscool