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

Add changelog and changelog automation #3364

Merged
merged 3 commits into from
Dec 7, 2017
Merged

Add changelog and changelog automation #3364

merged 3 commits into from
Dec 7, 2017

Conversation

agjohnson
Copy link
Contributor

First, update the version in our setup.cfg and changelog:

invoke prepare <version>

Then, hand edit and commit, added any release notes, etc. Tag manually or:

invoke release <version>

Finally, push up your changes.

This:

  • Uses setup.cfg instead of setup.py
  • Parses setup.cfg for version
  • Updates setup.cfg on release prepare task
  • Show our release version in our footer
  • Uses invoke for task execution
  • Uses a node library to hit GitHub and fetch the changelog
  • Imports this into our existing changelog

@ericholscher
Copy link
Member

The description of this PR should be in the docs included in the PR ;)

@agjohnson
Copy link
Contributor Author

We don't have a release manager doc yet, so I left this out.

@agjohnson
Copy link
Contributor Author

Also, this updates the changelog doc with a sample of 2.0 release. This can be updated when we actually release 2.0

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this!

Just a couple of comments.

tasks.py Outdated

This will stage a few updates for manual review and commit:

* Prepend the most recent PRs and issues that were closed to CHANGELOG.md.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHANELOG.rst ;)

config.read(setupcfg_path)
config.set('metadata', 'version', version)
with open(setupcfg_path, 'wb') as configfile:
config.write(configfile)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the other way around?

configfile.write(config)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, that would make sense though. :)

The ConfigParser API is goofy:
https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.write

tasks.py Outdated

Do this after prepare task and manual cleanup/commit
"""
ctx.run('git checkout master && git tag {version}'.format(version=version))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git push --tags or ...

Maybe after the prepare we need to stage and commit the changes. Then, release and after that push --tags but I think it should be written somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah true, that would be a good addition.

I'm not yet sure of this workflow. I like the idea of performing one large step, but we might want to double check on things in between version update and commit/push. We'll figure out better ways in the future.

I'll add in the git tag push though, that should definitely live here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the push maybe shouldn't be automatic be mentioned to the user to not forget to do it :)

First, update the version in our setup.cfg and changelog:

    invoke prepare <version>

Then, hand edit and commit, added any release notes, etc. Tag manually or:

    invoke release <version>

Finally, push up your changes.

This:

* Uses setup.cfg instead of setup.py
* Parses setup.cfg for version
* Updates setup.cfg on release prepare task
* Show our release version in our footer
* Uses invoke for task execution
* Uses a node library to hit GitHub and fetch the changelog
* Imports this into our existing changelog
@agjohnson agjohnson merged commit 01717c0 into master Dec 7, 2017
@agjohnson agjohnson deleted the changelog branch December 7, 2017 18:03
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

Successfully merging this pull request may close these issues.

3 participants