Skip to content

Commit

Permalink
bumped version to 0.4.10
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Oct 11, 2019
1 parent c7acd72 commit 567e680
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ Under BSD license. See [LICENSE](LICENSE).

## Release a new version

- Install those packages: `conda install twine rever`
- Install [rever](https://regro.github.io/rever-docs/index.html): `conda install rever`
- Run: `rever <VERSION>`
2 changes: 1 addition & 1 deletion jupyter_archive/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Project Jupyter.
# Distributed under the terms of the Modified BSD License.

__version__ = '0.4.9'
__version__ = '0.4.10'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hadim/jupyter-archive",
"version": "0.4.9",
"version": "0.4.10",
"description": "Make, download and extract archive files.",
"keywords": [
"jupyter",
Expand Down
25 changes: 23 additions & 2 deletions rever.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ command('publish_npm', 'yarn publish --access=public --new-version $VERSION', ''

$PROJECT = 'jupyter-archive'

$ACTIVITIES = ['run_tests', 'version_bump', 'tag', 'push_tag', 'pypi', 'publish_npm', 'ghrelease']
$ACTIVITIES = ['run_tests', 'version_bump', 'tag', 'push_tag', 'pypi', 'publish_npm', 'ghrelease', 'bump_to_dev']

$VERSION_BUMP_PATTERNS = [('jupyter_archive/_version.py', '__version__\s*=.*', "__version__ = '$VERSION'"),
('package.json', '"version"\s*:.*,', '"version": "$VERSION",')]
Expand All @@ -14,4 +14,25 @@ $PUSH_TAG_REMOTE = 'git@github.com:hadim/jupyter-archive.git'
$GITHUB_ORG = 'hadim'
$GITHUB_REPO = 'jupyter-archive'

# git commit -am "Bump to dev"
from rever.activity import activity
from rever.tools import eval_version, replace_in_file
from rever import vcsutils


@activity
def bump_to_dev():
def increment_version(version):
"""Increment a version by 0.0.1"""
version = version.split('.')
version[2] = str(int(version[2]) + 1)
return '.'.join(version)

# Increment to a new version and add '-dev' flag.
new_version = increment_version($VERSION)
new_version += "-dev"

for f, p, n in $VERSION_BUMP_PATTERNS:
n = n.replace("$VERSION", new_version)
n = eval_version(n)
replace_in_file(p, n, f)
vcsutils.commit('Bump to dev')

0 comments on commit 567e680

Please sign in to comment.