From 722e332743296328ad071f7b9d96f903adca43b8 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 14:31:08 +0100 Subject: [PATCH 01/14] make version --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0566fd8..04454e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,8 @@ jobs: - name: install dataclasses if: matrix.python-version == '3.6' run: pip install dataclasses + - name: make version + run: make version - name: run lint run: make test-lint - name: git info From f7e6dddc0841ba65b6c89887a18988861d02af06 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 14:33:05 +0100 Subject: [PATCH 02/14] make version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04454e0..bb86916 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: if: matrix.python-version == '3.6' run: pip install dataclasses - name: make version - run: make version + run: python agile.py validate - name: run lint run: make test-lint - name: git info From 248ae75501022555dbd6c000bc518167f473a5c9 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 14:36:52 +0100 Subject: [PATCH 03/14] make version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bb86916..ec1600a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: if: matrix.python-version == '3.6' run: pip install dataclasses - name: make version - run: python agile.py validate + run: python agile.py git validate - name: run lint run: make test-lint - name: git info From 524fc10d90be2fb20bfdef09727632bd2e9173dd Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 14:43:13 +0100 Subject: [PATCH 04/14] test is required --- tests/test_git.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_git.py b/tests/test_git.py index bffb881..9ce32bc 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -1,7 +1,6 @@ import json from unittest import mock -import pytest from click.testing import CliRunner from agiletoolkit.commands import start @@ -17,7 +16,6 @@ def test_git(): assert result.output.startswith("Usage:") -@pytest.mark.skip("This fails in CI") def test_git_validate(): runner = CliRunner() with gitrepo("deploy"): From 93ef0604d7f1277b1feed9df98bbc0e751e3e4f1 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 14:55:48 +0100 Subject: [PATCH 05/14] test 1 --- agiletoolkit/repo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/agiletoolkit/repo.py b/agiletoolkit/repo.py index 8aaa65f..1fa384c 100644 --- a/agiletoolkit/repo.py +++ b/agiletoolkit/repo.py @@ -56,6 +56,7 @@ def validate_version(self, prefix="v"): and its value is higher than latest github tag """ version = self.software_version() + print(version) repo = self.github_repo() repo.releases.validate_tag(version, prefix) return version From 4e16cfb3e774c3928e8c66831acd6d3372bde2f8 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:06:48 +0100 Subject: [PATCH 06/14] test validate --- .github/workflows/build.yml | 4 ++-- Makefile | 6 +++++- agiletoolkit/repo.py | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec1600a..4e5018e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,8 @@ jobs: - name: install dataclasses if: matrix.python-version == '3.6' run: pip install dataclasses - - name: make version - run: python agile.py git validate + - name: make validate + run: make validate - name: run lint run: make test-lint - name: git info diff --git a/Makefile b/Makefile index 343f0ba..3b52d33 100644 --- a/Makefile +++ b/Makefile @@ -38,5 +38,9 @@ codecov: release-github: ## new tag in github @python agile.py git release --yes -release-pypi: ## release to pypi and github tag +release-pypi: ## release to pypi and github tag @twine upload dist/* --username lsbardel --password $(PYPI_PASSWORD) + + +validate: ## validate version + @python agile.py git validate diff --git a/agiletoolkit/repo.py b/agiletoolkit/repo.py index 1fa384c..8aaa65f 100644 --- a/agiletoolkit/repo.py +++ b/agiletoolkit/repo.py @@ -56,7 +56,6 @@ def validate_version(self, prefix="v"): and its value is higher than latest github tag """ version = self.software_version() - print(version) repo = self.github_repo() repo.releases.validate_tag(version, prefix) return version From 4b71721326ab6625ede7d5c7991f5c882cd601ff Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:08:33 +0100 Subject: [PATCH 07/14] python --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3b52d33..2ed0eb4 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ test-lint: ## run linters check ./dev/run-black.sh --check version: ## Display version - @python3 -c "import agiletoolkit; print(agiletoolkit.__version__)" + @python -c "import agiletoolkit; print(agiletoolkit.__version__)" codecov: codecov -t $(CODECOV_TOKEN) @@ -41,6 +41,5 @@ release-github: ## new tag in github release-pypi: ## release to pypi and github tag @twine upload dist/* --username lsbardel --password $(PYPI_PASSWORD) - validate: ## validate version @python agile.py git validate From 25c147cd3db6ca77ba38588bed747c66ec12c465 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:10:41 +0100 Subject: [PATCH 08/14] python --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 2ed0eb4..388207e 100644 --- a/Makefile +++ b/Makefile @@ -42,4 +42,5 @@ release-pypi: ## release to pypi and github tag @twine upload dist/* --username lsbardel --password $(PYPI_PASSWORD) validate: ## validate version + @ls -la @python agile.py git validate From 473f80528dcc7992a546f4d789a28ae43338d9d3 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:13:00 +0100 Subject: [PATCH 09/14] version() --- agiletoolkit/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agiletoolkit/utils.py b/agiletoolkit/utils.py index f3e2eb9..c8328ac 100644 --- a/agiletoolkit/utils.py +++ b/agiletoolkit/utils.py @@ -160,4 +160,4 @@ def gitrepo(root=None): def version() -> str: - return sh("make version").strip().split()[-1] + return sh("make version").strip() From 46d47aa795409d16da96b833736b8b4ca2e4dab8 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:15:06 +0100 Subject: [PATCH 10/14] version() --- agiletoolkit/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/agiletoolkit/utils.py b/agiletoolkit/utils.py index c8328ac..31e49b2 100644 --- a/agiletoolkit/utils.py +++ b/agiletoolkit/utils.py @@ -159,5 +159,7 @@ def gitrepo(root=None): } -def version() -> str: - return sh("make version").strip() +def version(): + version = sh("make version") + print(version) + return version.strip().split()[-1] From b1247559dbb703e9e714428fd1d29e1993d6222c Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:22:48 +0100 Subject: [PATCH 11/14] hunting down the issue --- Makefile | 1 - agiletoolkit/utils.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 388207e..2ed0eb4 100644 --- a/Makefile +++ b/Makefile @@ -42,5 +42,4 @@ release-pypi: ## release to pypi and github tag @twine upload dist/* --username lsbardel --password $(PYPI_PASSWORD) validate: ## validate version - @ls -la @python agile.py git validate diff --git a/agiletoolkit/utils.py b/agiletoolkit/utils.py index 31e49b2..cd17851 100644 --- a/agiletoolkit/utils.py +++ b/agiletoolkit/utils.py @@ -161,5 +161,5 @@ def gitrepo(root=None): def version(): version = sh("make version") - print(version) + print("Got this from make version\n%s\n------\n" % version) return version.strip().split()[-1] From 449c3e52afc55215d08dce37d469f3d8ffd95bc1 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:26:41 +0100 Subject: [PATCH 12/14] hunting down the issue --- agiletoolkit/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agiletoolkit/utils.py b/agiletoolkit/utils.py index cd17851..c9d1765 100644 --- a/agiletoolkit/utils.py +++ b/agiletoolkit/utils.py @@ -160,6 +160,6 @@ def gitrepo(root=None): def version(): - version = sh("make version") + version = sh("make -s version") print("Got this from make version\n%s\n------\n" % version) return version.strip().split()[-1] From d435cad0a0b67326c99e568f40aeb3aad5e7f8bf Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:31:21 +0100 Subject: [PATCH 13/14] version should be fine now --- agiletoolkit/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/agiletoolkit/utils.py b/agiletoolkit/utils.py index c9d1765..0baa6b5 100644 --- a/agiletoolkit/utils.py +++ b/agiletoolkit/utils.py @@ -161,5 +161,4 @@ def gitrepo(root=None): def version(): version = sh("make -s version") - print("Got this from make version\n%s\n------\n" % version) return version.strip().split()[-1] From de2efc3b026145d4bf6e56421dd7f932ee7a8b93 Mon Sep 17 00:00:00 2001 From: Luca Sbardella Date: Fri, 24 Jul 2020 15:34:58 +0100 Subject: [PATCH 14/14] test releasing --- agiletoolkit/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agiletoolkit/__init__.py b/agiletoolkit/__init__.py index 633975c..9348717 100644 --- a/agiletoolkit/__init__.py +++ b/agiletoolkit/__init__.py @@ -1,3 +1,3 @@ """Agile toolkit for devops and repository management""" -__version__ = "0.5.0" +__version__ = "0.5.1"