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

@agjohnson agjohnson commented Dec 5, 2017

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

@ericholscher ericholscher commented Dec 5, 2017

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

Loading

@agjohnson
Copy link
Contributor Author

@agjohnson agjohnson commented Dec 5, 2017

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

Loading

@agjohnson
Copy link
Contributor Author

@agjohnson agjohnson commented Dec 5, 2017

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

Loading

Copy link
Member

@humitos humitos left a comment

I really like this!

Just a couple of comments.

Loading

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

@humitos humitos Dec 6, 2017

Choose a reason for hiding this comment

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

CHANELOG.rst ;)

Loading

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

@humitos humitos Dec 6, 2017

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)

Loading

Copy link
Contributor Author

@agjohnson agjohnson Dec 6, 2017

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

Loading

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

@humitos humitos Dec 6, 2017

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.

Loading

Copy link
Contributor Author

@agjohnson agjohnson Dec 6, 2017

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.

Loading

Copy link
Member

@humitos humitos Dec 6, 2017

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 :)

Loading

agjohnson added 3 commits Dec 6, 2017
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
2 checks passed
Loading
@agjohnson agjohnson deleted the changelog branch Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants