Skip to content

Commit

Permalink
Implement dynamic versioning
Browse files Browse the repository at this point in the history
Fix #159.
  • Loading branch information
Jairo Llopis committed Mar 15, 2020
1 parent 6486b27 commit a442fb7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: generate cache key PY
run: echo "::set-env name=PY::$((python -VV; poetry -V) | sha256sum | cut -d' '
run: echo "::set-env name=PY::$((python -VV; pip freeze) | sha256sum | cut -d' '
-f1)"
- uses: actions/cache@v1
with:
Expand All @@ -31,7 +31,7 @@ jobs:
with:
path: ~/.local
key: local-${{ env.PY }}|${{ hashFiles('pyproject.toml') }}|${{ hashFiles('poetry.lock') }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: python -m pip install poetry
- run: python -m pip install poetry poetry-dynamic-versioning
- run: poetry install
- name: Run pre-commit
run: |
Expand All @@ -52,9 +52,9 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- run: python -m pip install poetry
- run: python -m pip install poetry poetry-dynamic-versioning
- name: generate cache key PY
run: echo "::set-env name=PY::$((python -VV; poetry -V) | sha256sum | cut -d' '
run: echo "::set-env name=PY::$((python -VV; pip freeze) | sha256sum | cut -d' '
-f1)"
- uses: actions/cache@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- run: python -m pip install poetry
- run: python -m pip install poetry poetry-dynamic-versioning
- name: generate cache key PY
run: echo "::set-env name=PY::$((python -VV; poetry -V) | sha256sum | cut -d' '
run: echo "::set-env name=PY::$((python -VV; pip freeze) | sha256sum | cut -d' '
-f1)"
- uses: actions/cache@v1
with:
Expand Down
1 change: 0 additions & 1 deletion copier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
"""
from .main import * # noqa
from .tools import * # noqa
from .version import __version__ # noqa
2 changes: 0 additions & 2 deletions copier/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from .config.objects import UserMessageError
from .main import copy
from .types import AnyByStrDict, OptStr
from .version import __version__


def handle_exceptions(method):
Expand Down Expand Up @@ -38,7 +37,6 @@ class CopierApp(cli.Application):
copier [SWITCHES] [update] [destination_path]
"""
)
VERSION = __version__
CALL_MAIN_IF_NESTED_COMMAND = False
data: AnyByStrDict = {}

Expand Down
7 changes: 0 additions & 7 deletions copier/version.py

This file was deleted.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool]
[tool.poetry]
name = "copier"
version = "3.0.0-alpha6"
version = "0.0.0"
description = "A library for rendering project templates."
license = "MIT"
classifiers = [
Expand Down Expand Up @@ -52,6 +52,11 @@ pre-commit = "*"
pytest = "^5.3"
pytest-cov = "*"

[tool.poetry-dynamic-versioning]
enable = true
style = "semver"
vcs = "git"

[tool.black]
line-length = 88
target-version = ['py36']
Expand Down

0 comments on commit a442fb7

Please sign in to comment.