diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2022-03-30 16:31:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 16:31:51 -0700 |
commit | 191c1384b65e0fbd0b207a5ffff448d8b3421fb0 (patch) | |
tree | a42f98bd65d01dd87a6618f1f591f270b0891aef | |
parent | bd531dab50afd61c83b4e608b61804f8f14e0892 (diff) | |
parent | 26f5bc653a091d134dce69875c25edd50ce79c8d (diff) |
Merge pull request #1045 from dbcli/j-bennet/update-readme-release
Add release instructions.
-rw-r--r-- | CONTRIBUTING.md | 28 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | release.py | 3 | ||||
-rw-r--r-- | requirements-dev.txt | 14 | ||||
-rwxr-xr-x | setup.py | 4 |
5 files changed, 37 insertions, 14 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 124b19a..3075600 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,16 +49,16 @@ You'll always get credit for your work. $ pip install --editable . ``` -6. Create a branch for your bugfix or feature based off the `master` branch: +6. Create a branch for your bugfix or feature based off the `main` branch: ```bash - $ git checkout -b <name-of-bugfix-or-feature> master + $ git checkout -b <name-of-bugfix-or-feature> main ``` 7. While you work on your bugfix or feature, be sure to pull the latest changes from `upstream`. This ensures that your local codebase is up-to-date: ```bash - $ git pull upstream master + $ git pull upstream main ``` 8. When your work is ready for the mycli team to review it, push your branch to your fork: @@ -135,3 +135,25 @@ $ ./setup.py lint --fix ``` Be sure to commit and push any PEP 8 fixes. + +## Releasing a new version of mycli + +You have been made the maintainer of `mycli`? Congratulations! We have a release script to help you: + +```sh +> python release.py --help +Usage: release.py [options] + +Options: + -h, --help show this help message and exit + -c, --confirm-steps Confirm every step. If the step is not confirmed, it + will be skipped. + -d, --dry-run Print out, but not actually run any steps. +``` + +To release a new version of the package: + +* Create and merge a PR to bump the version in the changelog ([example PR](https://github.com/dbcli/mycli/pull/1043)). +* Pull `main` and bump the version number inside `mycli/__init__.py`. Do not check in - the release script will do that. +* Make sure you have the dev requirements installed: `pip install -r requirements-dev.txt -U --upgrade-strategy only-if-needed`. +* Finally, run the release script: `python release.py`. @@ -141,7 +141,7 @@ If you're interested in contributing to this project, first of all I would like to extend my heartfelt gratitude. I've written a small doc to describe how to get this running in a development setup. -https://github.com/dbcli/mycli/blob/master/CONTRIBUTING.md +https://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md Please feel free to reach out to me if you need help. @@ -90,7 +90,6 @@ if __name__ == '__main__': subprocess.check_output = lambda x: x ver = version('mycli/__init__.py') - print('Releasing Version:', ver) parser = OptionParser() parser.add_option( @@ -107,6 +106,8 @@ if __name__ == '__main__': CONFIRM_STEPS = popts.confirm_steps DRY_RUN = popts.dry_run + print('Releasing Version:', ver) + if not click.confirm('Are you sure?', default=False): sys.exit(1) diff --git a/requirements-dev.txt b/requirements-dev.txt index 9c40316..107106d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1,13 @@ -pytest!=3.3.0 -pytest-cov==2.4.0 +pytest>=3.3.0 +pytest-cov>=2.4.0 tox -twine==1.12.1 +twine>=1.12.1 behave>=1.2.4 -pexpect==3.3 -coverage==5.0.4 -codecov==2.0.9 +pexpect>=3.3 +coverage>=5.0.4 +codecov>=2.0.9 autopep8==1.3.3 -colorama==0.4.1 +colorama>=0.4.1 git+https://github.com/hayd/pep8radius.git # --error-status option not released click>=7.0 paramiko==2.7.1 @@ -38,14 +38,14 @@ class lint(Command): description = 'check code against PEP 8 (and fix violations)' user_options = [ - ('branch=', 'b', 'branch/revision to compare against (e.g. master)'), + ('branch=', 'b', 'branch/revision to compare against (e.g. main)'), ('fix', 'f', 'fix the violations in place'), ('error-status', 'e', 'return an error code on failed PEP check'), ] def initialize_options(self): """Set the default options.""" - self.branch = 'master' + self.branch = 'main' self.fix = False self.error_status = True |