Skip to content

[WIP] Automate the release process #4797

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

Closed
wants to merge 0 commits into from

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Oct 20, 2017

Resolves #2312
Resolves #2313
Resolves #2314

In my head, this is the aim:

# Prepare for release:
# - Generate AUTHORS, NEWS
# - Drop "dev" from version + signed git tag for the current version
# - Generate release artefacts and get-pip.py
# - Sign build artefacts
$ invoke release.prepare
# should print what all needs to be done next.

# Release done. Let's get back to work.
# - Asks for the next version string
$ invoke release.next

Things to implement:

  • release.prepare
    • Version Management
    • Generate AUTHORS
    • Generate NEWS
    • Build Release Artefacts
    • Sign Release Artefacts
    • Git Tag Creation
  • release.next
    • Version Management

@pradyunsg pradyunsg added C: automation Automated checks, CI etc type: maintenance Related to Development and Maintenance Processes labels Oct 20, 2017
@pradyunsg pradyunsg self-assigned this Oct 20, 2017
from invoke import task


def _bump_version_str(version_str, major=False, minor=False, patch=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

yet another version bumping system?

Copy link
Member Author

@pradyunsg pradyunsg Oct 20, 2017

Choose a reason for hiding this comment

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

It's super trivial?

invoke release.bump-version --minor/--major/--patch/--dev/--final

Anyway, it's an internal detail and won't be too hard to switch to setuptools_scm or something if it's what others want to do.

@pradyunsg
Copy link
Member Author

@pypa/pip-committers Do you think this is a good idea/approach?

@pfmoore
Copy link
Member

pfmoore commented Oct 20, 2017

I'm looking at picking up the release process for pip 10, so I'll find some time to take a look at this.

@pradyunsg
Copy link
Member Author

It's not complete yet and my gut feeling is if pip 10 is gonna happen this month, it won't be done by then. Hopefully a pip 10.0.1 or something would be made using this. :)

@pfmoore
Copy link
Member

pfmoore commented Oct 20, 2017

No problem, I'd rather not rush something like this in. It may well be better to look at it after a release anyway, while the experience is fresh in our minds :-)

setup.py Outdated
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather we keep the version in only one place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah... I think so too now.

also, https://www.python.org/dev/peps/pep-0396/#specification (point 8)

Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW, I was trying to make setup.py as declarative as possible.

'dev': "Bumps the dev segment, retaining the other segments.",
'final': "Drops any dev segment in the version.",
})
def bump_version(ctx, major=False, minor=False, patch=False,
Copy link
Member

Choose a reason for hiding this comment

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

We could use zest.releaser's bumpversion command for that part.

Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW, I do think this should use some existing tool, I'm not sure which one though.

I'll look at zest.releaser soon. :)

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Apr 15, 2018
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label May 27, 2018
@pradyunsg pradyunsg closed this May 27, 2018
@pradyunsg
Copy link
Member Author

Closing since I'm drafting. Don't look. :P

@pradyunsg pradyunsg deleted the release/automate branch May 27, 2018 10:23
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: automation Automated checks, CI etc type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate the Release Process Automated the Creation and Upload of Release Artifacts Automate Version Handling During Release
6 participants