Skip to content

Commit

Permalink
Update bump script
Browse files Browse the repository at this point in the history
  • Loading branch information
florimondmanca committed Aug 24, 2019
1 parent ad58cd4 commit 3be6c21
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ commit = False
tag = False

[bumpversion:file:rest_framework_api_key/__init__.py]

[bumpversion:file:pyproject.toml]
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ deploy:
tags: true
# deploy only once
python: "3.7"
condition: "$DJANGO_VERSION = 2.2"
condition: "$DJANGO_VERSION = 2.2.*"
21 changes: 3 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,12 @@ $ python scripts/makemigrations.py
- `test`: run test suite.
- `lint`: run linters and auto-formatters.
- `check`: check code style.

### CI/CD

Travis CI is in use to automatically:

- Test the package on supported versions of Python and Django.
- Release _tagged commits_ to PyPI.

See `.travis.yml` for further details.
- `bump (patch | minor | major)`: bump package version (extra options are forwared to [bumpversion](https://pypi.org/project/bumpversion/)).

### Releasing

When ready to release a new version, use [bumpversion](https://pypi.org/project/bumpversion/) to update the package's version:

```bash
$ bumpversion (patch | minor | major)
```

This will create a new commit and tag that commit with the new version. See [.bumpversion.cfg](.bumpversion.cfg) for more info.

Then, push the tagged commit to remote:
- Update the package version using the `bump` script.
- Push the tagged commit to remote:

```bash
$ git push --tags
Expand Down
7 changes: 2 additions & 5 deletions scripts/bumpversion.sh → scripts/bump
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash

# Stop if any command fails.
set -e
#!/bin/bash -e

ARGS="$@"
CHANGELOG="CHANGELOG.md"
Expand All @@ -14,7 +11,7 @@ CURRENT_VERSION=$(get current_version)
NEW_VERSION=$(get new_version)

bumpversion "$@" --no-tag --no-commit
python scripts/changelog_bump.py "$CHANGELOG" "v$NEW_VERSION"
python scripts/bump_changelog.py "$CHANGELOG" "v$NEW_VERSION"

git add -A
git commit -m "Bump version: $CURRENT_VERSION$NEW_VERSION"
Expand Down
File renamed without changes.

0 comments on commit 3be6c21

Please sign in to comment.