Skip to content

Commit

Permalink
Release v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Dec 13, 2019
1 parent 9d4803b commit 315ec1b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ __pycache__/
.mypy_cache/
.pytest_cache/
.tox/
.vagrant/
.venv/
*.egg-info/
/setup.py
build/
dist/
htmlcov/
pip-wheel-metadata/
*.log
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ env:
- POETRY_VER=0.12.10 INSTALL_METHOD=script
- POETRY_VER=0.12.17 INSTALL_METHOD=pip
- POETRY_VER=0.12.17 INSTALL_METHOD=script
- POETRY_VER=1.0.0b3 INSTALL_METHOD=pip
- POETRY_VER=1.0.0b3 INSTALL_METHOD=script
- POETRY_VER=1.0.0 INSTALL_METHOD=pip
- POETRY_VER=1.0.0 INSTALL_METHOD=script

install:
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -o ./get-poetry.py
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.3.2 (2019-12-13)

* Fixed an issue with Poetry 1.0.0b2 and newer where the original version
would not be restored after `poetry run`.
(Contributed by [lmoretto](https://github.com/lmoretto))

## v0.3.1 (2019-11-28)

* Fixed [#3](https://github.com/mtkennerly/poetry-dynamic-versioning/issues/3)
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ liberties to make the functionality possible. As soon as official support
lands, this plugin will be updated to do things the official way.

## Installation
Python 3.5 (or newer) and Poetry 0.12.1 (or newer) are required.
Python 3.5 or newer and Poetry 0.12.1 or newer are required.
(Pyenv users will need Poetry 1.0.0b2 or newer.)

* Run `pip install poetry-dynamic-versioning`
* Add this to your pyproject.toml:
Expand Down Expand Up @@ -76,6 +77,10 @@ vcs = "git"
style = "semver"
```

## Caveats
* The dynamic version is not available during `poetry run` because Poetry
uses [`os.execvp()`](https://docs.python.org/2/library/os.html#os.execvp).

## Implementation
In order to side-load plugin functionality into Poetry, this package
does the following:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "poetry-dynamic-versioning"
version = "0.3.1"
version = "0.3.2"
description = "Plugin for Poetry to enable dynamic versioning based on VCS tags"
license = "MIT"
authors = ["Matthew T. Kennerly <mtkennerly@gmail.com>"]
Expand Down
12 changes: 6 additions & 6 deletions tests/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function teardown {

function test_plugin_enabled {
$do_poetry build -v
ls $dummy/dist | grep -v 0.0.999
! ls $dummy/dist | grep 0.0.999
}

function test_plugin_disabled {
Expand All @@ -43,14 +43,14 @@ function test_keep_pyproject_modifications {
# Using --optional to avoid actually installing the package
$do_poetry add --optional $package
# Make sure pyproject.toml contains the new package dependency
cat $dummy/pyproject.toml | grep $package
grep $package $dummy/pyproject.toml
}

function test_poetry_run {
$do_poetry run echo "Testing 'poetry run'"
# Make sure original version number is restored
# also when executing a 'poetry run' command
cat $dummy/pyproject.toml | grep "version = \"0.0.999\""
# The original version is restored before the command runs:
$do_poetry run grep 'version = "0.0.999"' $dummy/pyproject.toml
# Make sure original version number is still in place:
grep 'version = "0.0.999"' $dummy/pyproject.toml
}

function run_test {
Expand Down

0 comments on commit 315ec1b

Please sign in to comment.