Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automating publication of Git Rev News #273

Open
chriscool opened this issue Dec 20, 2017 · 7 comments
Open

Automating publication of Git Rev News #273

chriscool opened this issue Dec 20, 2017 · 7 comments

Comments

@chriscool
Copy link
Collaborator

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@dscho
Copy link
Member

dscho commented Dec 21, 2018

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.

@chriscool
Copy link
Collaborator Author

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
Copy link
Collaborator Author

More automation in chriscool/getreleases@66cec42

@chriscool
Copy link
Collaborator Author

@chriscool
Copy link
Collaborator Author

@dscho with the following improvements:

I think all your suggestions have been implemented and we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants