Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[bumpversion]
current_version = 1.5.0
commit = True
tag = True

[bumpversion:file:watson_developer_cloud/version.py]
search = __version__ = '{current_version}'
Expand Down
15 changes: 15 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branch": "master",
"verifyConditions": [],
"prepare": [
{
"path": "@semantic-release/exec",
"cmd": "bumpversion --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch"
}
],
"publish": [
{
"path": "@semantic-release/github",
}
]
}
26 changes: 19 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ cache: pip
before_install:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && openssl aes-256-cbc -K $encrypted_cebf25e6c525_key
-iv $encrypted_cebf25e6c525_iv -in .env.enc -out .env -d || true'
install: pip install tox-travis
- npm install npm@latest -g
install:
- pip install tox-travis
- pip install bumpversion
- npm install @semantic-release/exec
script:
- pip install -U python-dotenv
- tox
Expand All @@ -18,9 +22,17 @@ before_deploy:
- pip install -r requirements-dev.txt
- pip install --editable .
deploy:
provider: script
script: docs/publish.sh
skip_cleanup: true
on:
python: '2.7'
all_branches: true
- provider: script
script: docs/publish.
skip_cleanup: true
- provider: script
script: npx semantic-release
skip_cleanup: true
- provider: pypi
user: ehdsouza
password:
secure: eMssjS1Airz5MrmcEDAnKYnTlMLuzinX8JFsh4TB0A4t7GCes2a/mlvcoazAv2QZMQUKQMC++bAXYGGgXtsSQsfOYnRtojW4pRphxOZrlXlWFgCLGz/eHioamNZVbH+/P/OYjbLy5ZKSzp3M3bZxYqHcmGTq0sBeo5A2Ilkzu5P+D865Jqtn52brwh/xYq4XWeJeQN/BSLwdtPEtZYQXhQupAteNDAo2ON0FVyt0amINrjA0Qw+0k35g36wti+CsKn5fhbaHf6jjN0oRj8J8wPZieXLAUMdxscfBjUXJ8AK8E4H/wPI30IsaMus+1r85ekiDKZC5iukO6uqMARFywjX/eTIDbWxwKImQUgvVa2+gncre7GvZrHIFxhIDDkssH1IfC1fcw3mNY4vCO9df/vHStp3Kvi27GvsYJnfsbXXj6fAhokHtsrnrbpXFET6LghGQx3HgOKrlCQ1EI0Fk92Qw7+g15jwMGlkwUE1qMS+PVOe7dQ4ikxJgw4CVrqU6/zaLFHV8LXFfjv166ZSWcOJHJXGgJ2TPuGiooL60+pWp/UYY00hZVlYX0Vlks6zN0h9zJd16kR3EwDrW0muqFnLC2xTuv5WsCjsOATtsTQzmBNEdCbGdOskgF4+0yPe7ps3kEs3UpAooKtYVh1OOJAUkl4vSMyu4Jg1ASyQWt00=
repository: https://upload.pypi.org/legacy
skip_cleanup: true
on:
python: '2.7'
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ If you want to contribute to the repository, here's a quick guide:
* Make sure your code supports Python 2.7, 3.4, 3.5 and 3.6. You can use `pyenv` and `tox` for this
1. Make the test pass
1. Commit your changes
* Commits should follow the [Angular commit message guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines). This is because our release tool uses this format for determining release versions and generating changelogs. To make this easier, we recommend using the [Commitizen CLI](https://github.com/commitizen/cz-cli) with the `cz-conventional-changelog` adapter.
1. Push to your fork and submit a pull request to the `dev` branch

## Running the tests
Expand Down
35 changes: 1 addition & 34 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
# Release process

Standard practice with pypi libraries is to commit all of the changes for a release except updating the version. We use [bumpversion] to update the version file, commit, and tag the changes.

## 1. Updating the version

A small command line tool to simplify releasing software by updating all version strings in your source code by the correct increment.

Install it with:

```bash
pip install bumpversion
```

## 2. Doing a release

(The pypandoc module should be installed on the system doing the release, to generate the documentation for pip.)

```sh
bumpversion major|minor|patch
git push origin master
git push origin --tags
python setup.py publish
```

`bumpversion *` will update the version field appropriately, create a git commit and tag for the version, and publish the tag to github.

`git push origin master` will publish the changes to package.json.

`git push origin --tags` will publish the tag to github., and then immediately.

`python setup.py publish` will publish the module to pypi.

The reason for this is that it allows someone to easily view the source code (and readme) for whatever version they happen to have downloaded from pypi. This is particularly helpful when github is ahead of pypi.

[bumpversion]: https://pypi.python.org/pypi/bumpversion
The semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing to pypi.