Skip to content

Commit

Permalink
Merge pull request #162 from Tecnativa/dynamic-versioning
Browse files Browse the repository at this point in the history
Dynamic versioning
  • Loading branch information
yajo authored Mar 15, 2020
2 parents 6d98400 + a442fb7 commit 5286351
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 24 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
8 changes: 2 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ repos:
pass_filenames: false

# isorting our imports
- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
additional_dependencies:
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.

10 changes: 8 additions & 2 deletions 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,15 +52,21 @@ 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']

[tool.isort]
combine_as_imports = true
default_section = "THIRDPARTY"
force_grid_wrap = 0
include_trailing_comma = true
known_third_party = ["colorama", "jinja2", "packaging", "pathspec", "pkg_resources", "plumbum", "py", "pydantic", "pytest", "six", "yaml", "yamlinclude"]
known_first_party = ["copier"]
line_length = 88
multi_line_output = 3 # black interop
use_parentheses = true
Expand Down

0 comments on commit 5286351

Please sign in to comment.