From e16a8bf1f9ccb5898521b588f5a635cd84d353b4 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 20:30:33 -0400 Subject: [PATCH 01/24] Test commit --- azure-pipelines-release.yml | 7 ++ scripts/version_bump.py | 179 ------------------------------------ 2 files changed, 7 insertions(+), 179 deletions(-) create mode 100644 azure-pipelines-release.yml delete mode 100644 scripts/version_bump.py diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml new file mode 100644 index 0000000..133e415 --- /dev/null +++ b/azure-pipelines-release.yml @@ -0,0 +1,7 @@ +# Python package +# Create and test a Python package on multiple Python versions. +# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/python + +trigger: none + diff --git a/scripts/version_bump.py b/scripts/version_bump.py deleted file mode 100644 index aea7e12..0000000 --- a/scripts/version_bump.py +++ /dev/null @@ -1,179 +0,0 @@ -#!/usr/bin/env python3 -"""Helper script to bump the current version.""" - -import argparse -import re -import subprocess -from datetime import datetime - -from packaging.version import Version - -import pyvesync_v2 as pv - - -def _bump_release(release, bump_type): - """Bump a release tuple consisting of 3 numbers.""" - major, minor, patch = release - - if bump_type == "patch": - patch += 1 - elif bump_type == "minor": - minor += 1 - patch = 0 - - return major, minor, patch - - -def bump_version(version, bump_type): - """Return a new version given a current version and action.""" - to_change = {} - - if bump_type == "minor": - # Convert 0.67.3 to 0.68.0 - # Convert 0.67.3.b5 to 0.68.0 - # Convert 0.67.3.dev0 to 0.68.0 - # Convert 0.67.0.b5 to 0.67.0 - # Convert 0.67.0.dev0 to 0.67.0 - to_change["dev"] = None - to_change["pre"] = None - - if not version.is_prerelease or version.release[2] != 0: - to_change["release"] = _bump_release(version.release, "minor") - - elif bump_type == "patch": - # Convert 0.67.3 to 0.67.4 - # Convert 0.67.3.b5 to 0.67.3 - # Convert 0.67.3.dev0 to 0.67.3 - to_change["dev"] = None - to_change["pre"] = None - - if not version.is_prerelease: - to_change["release"] = _bump_release(version.release, "patch") - - elif bump_type == "dev": - # Convert 0.67.3 to 0.67.4.dev0 - # Convert 0.67.3.b5 to 0.67.4.dev0 - # Convert 0.67.3.dev0 to 0.67.3.dev1 - if version.is_devrelease: - to_change["dev"] = ("dev", version.dev + 1) - else: - to_change["pre"] = ("dev", 0) - to_change["release"] = _bump_release(version.release, "minor") - - elif bump_type == "beta": - # Convert 0.67.5 to 0.67.6b0 - # Convert 0.67.0.dev0 to 0.67.0b0 - # Convert 0.67.5.b4 to 0.67.5b5 - - if version.is_devrelease: - to_change["dev"] = None - to_change["pre"] = ("b", 0) - - elif version.is_prerelease: - if version.pre[0] == "a": - to_change["pre"] = ("b", 0) - if version.pre[0] == "b": - to_change["pre"] = ("b", version.pre[1] + 1) - else: - to_change["pre"] = ("b", 0) - to_change["release"] = _bump_release(version.release, "patch") - - else: - to_change["release"] = _bump_release(version.release, "patch") - to_change["pre"] = ("b", 0) - - elif bump_type == "nightly": - # Convert 0.70.0d0 to 0.70.0d20190424, fails when run on nondev release - if not version.is_devrelease: - raise ValueError("Can only be run on dev release") - - to_change["dev"] = ( - "dev", - datetime.utcnow().date().isoformat().replace("-", ""), - ) - - else: - assert False, "Unsupported type: {}".format(bump_type) - - temp = Version("0") - temp._version = version._version._replace(**to_change) - return Version(str(temp)) - - -def write_version(version): - """Update Home Assistant constant file with new version.""" - with open("src/pyvesync_v2/const.py") as fil: - content = fil.read() - - major, minor, patch = str(version).split(".", 2) - - content = re.sub("MAJOR_VERSION = .*\n", - "MAJOR_VERSION = {}\n".format(major), content) - content = re.sub("MINOR_VERSION = .*\n", - "MINOR_VERSION = {}\n".format(minor), content) - content = re.sub("PATCH_VERSION = .*\n", - 'PATCH_VERSION = "{}"\n'.format(patch), content) - - with open("src/pyvesync_v2/const.py", "wt") as fil: - content = fil.write(content) - - -def main(): - """Execute script.""" - parser = argparse.ArgumentParser( - description="Bump version of Home Assistant") - parser.add_argument( - "type", - help="The type of the bump the version to.", - choices=["beta", "dev", "patch", "minor", "nightly"], - ) - - arguments = parser.parse_args() - - current = Version(pv.const.__version__) - bumped = bump_version(current, arguments.type) - assert bumped > current, "BUG! New version is not newer than old version" - - write_version(bumped) - - if not arguments.commit: - return - - subprocess.run(["git", "commit", "-am", - "Bumped version to {}".format(bumped)]) - - -def test_bump_version(): - """Make sure it all works.""" - import pytest - - assert bump_version(Version("0.56.0"), "beta") == Version("0.56.1b0") - assert bump_version(Version("0.56.0b3"), "beta") == Version("0.56.0b4") - assert bump_version(Version("0.56.0.dev0"), "beta") == Version("0.56.0b0") - - assert bump_version(Version("0.56.3"), "dev") == Version("0.57.0.dev0") - assert bump_version(Version("0.56.0b3"), "dev") == Version("0.57.0.dev0") - assert bump_version(Version("0.56.0.dev0"), - "dev") == Version("0.56.0.dev1") - - assert bump_version(Version("0.56.3"), "patch") == Version("0.56.4") - assert bump_version(Version("0.56.3.b3"), "patch") == Version("0.56.3") - assert bump_version(Version("0.56.0.dev0"), "patch") == Version("0.56.0") - - assert bump_version(Version("0.56.0"), "minor") == Version("0.57.0") - assert bump_version(Version("0.56.3"), "minor") == Version("0.57.0") - assert bump_version(Version("0.56.0.b3"), "minor") == Version("0.56.0") - assert bump_version(Version("0.56.3.b3"), "minor") == Version("0.57.0") - assert bump_version(Version("0.56.0.dev0"), "minor") == Version("0.56.0") - assert bump_version(Version("0.56.2.dev0"), "minor") == Version("0.57.0") - - today = datetime.utcnow().date().isoformat().replace("-", "") - assert bump_version(Version("0.56.0.dev0"), "nightly") == Version( - "0.56.0.dev{}".format(today) - ) - with pytest.raises(ValueError): - assert bump_version(Version("0.56.0"), "nightly") - - -if __name__ == "__main__": - main() From bbceffe056cdf42769342a855cbfa6f8abf72248 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 21:08:16 -0400 Subject: [PATCH 02/24] Update setup.cfg --- setup.cfg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index b98a7ec..0899dea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,4 +6,11 @@ license_file = LICENSE [tool:pytest] testpaths = src/tests -norecursedirs = .git \ No newline at end of file +norecursedirs = .git + +[bumpversion] +current_version = 0.9.9 +commit = True +tag = True + +[bumpversion:file:setup.py] \ No newline at end of file From 8eba69bfe655849ee90112f180a0e86c80bed3c2 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 21:09:13 -0400 Subject: [PATCH 03/24] Version Test --- setup.py | 2 +- src/pyvesync_v2/const.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 src/pyvesync_v2/const.py diff --git a/setup.py b/setup.py index 987857b..d16aabb 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='pyvesync_v2', - version=pv_const.__VERSION__, + version='0.9.9', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown', diff --git a/src/pyvesync_v2/const.py b/src/pyvesync_v2/const.py deleted file mode 100644 index 6185e6f..0000000 --- a/src/pyvesync_v2/const.py +++ /dev/null @@ -1,6 +0,0 @@ -"""pyvesync_v2 constants.""" - -MAJOR_VERSION = '1' -MINOR_VERSION = '0' -PATH_VERSION = '0' -__VERSION__ = '{}.{}.{}'.format(MAJOR_VERSION, MINOR_VERSION, PATH_VERSION) From a3bfee545fb85c9bb05184f342538192786b11d2 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 21:10:35 -0400 Subject: [PATCH 04/24] =?UTF-8?q?Bump=20version:=200.9.9=20=E2=86=92=201.0?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 11 ++++++----- setup.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0899dea..c19141a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,8 @@ +[bumpversion] +current_version = 1.0.0 +commit = True +tag = True + [bdist_wheel] universal = 1 @@ -8,9 +13,5 @@ license_file = LICENSE testpaths = src/tests norecursedirs = .git -[bumpversion] -current_version = 0.9.9 -commit = True -tag = True +[bumpversion:file:setup.py] -[bumpversion:file:setup.py] \ No newline at end of file diff --git a/setup.py b/setup.py index d16aabb..24b193c 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='pyvesync_v2', - version='0.9.9', + version='1.0.0', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown', From f717d5e1c3b95680febb3c42cf472a7a304a3320 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 21:11:36 -0400 Subject: [PATCH 05/24] =?UTF-8?q?Revert=20"Bump=20version:=200.9.9=20?= =?UTF-8?q?=E2=86=92=201.0.0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a3bfee545fb85c9bb05184f342538192786b11d2. --- setup.cfg | 11 +++++------ setup.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/setup.cfg b/setup.cfg index c19141a..0899dea 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,3 @@ -[bumpversion] -current_version = 1.0.0 -commit = True -tag = True - [bdist_wheel] universal = 1 @@ -13,5 +8,9 @@ license_file = LICENSE testpaths = src/tests norecursedirs = .git -[bumpversion:file:setup.py] +[bumpversion] +current_version = 0.9.9 +commit = True +tag = True +[bumpversion:file:setup.py] \ No newline at end of file diff --git a/setup.py b/setup.py index 24b193c..d16aabb 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='pyvesync_v2', - version='1.0.0', + version='0.9.9', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown', From 897f6e58f8ac4e839e6ffb48e370b7ab5e347bde Mon Sep 17 00:00:00 2001 From: webdjoe Date: Thu, 3 Oct 2019 21:48:48 -0400 Subject: [PATCH 06/24] Update setup.py --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index d16aabb..14ace49 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,6 @@ from setuptools import setup, find_packages from os import path -from pyvesync_v2 import const as pv_const - this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() From dad8468a66e0cfc636ff92c6b42842c5df685eff Mon Sep 17 00:00:00 2001 From: webdjoe Date: Sat, 5 Oct 2019 01:04:40 -0400 Subject: [PATCH 07/24] Update azure-pipelines-release.yml --- azure-pipelines-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 133e415..08bf27a 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -5,3 +5,13 @@ trigger: none +jobs: +- job: 'Process Commit' + pool: + vmImage: 'ubuntu-latest' + steps: + - task: BuildType@1 + name: BuildName + - script: | + apt-get install -y --no-install recommends jq curl + From 0230a6b49b03c0c3e26164b4a4b8203a834af5e0 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 18:47:54 -0400 Subject: [PATCH 08/24] Add azure release --- README.md | 5 ++++- azure-pipelines-release.yml | 27 +++++++++++++++++++++++---- setup.cfg | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 149060c..92bcb31 100644 --- a/README.md +++ b/README.md @@ -321,9 +321,12 @@ Run all tests: ```bash $ tox +# Tests for python3.5, 3.6, 3.7, pylint and flake8 succeeded ``` Individual tests can be run with the `-e` flag: + ```bash $ tox -e py35 -``` \ No newline at end of file +# Tests for Python 3.5 succeeded +``` diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 08bf27a..7fb9632 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -10,8 +10,27 @@ jobs: pool: vmImage: 'ubuntu-latest' steps: - - task: BuildType@1 - name: BuildName - - script: | - apt-get install -y --no-install recommends jq curl + - task: UsePythonVersion@0 + name: BumpPart + inputs: + versionSpec: '3.7' + - bash: | + echo "Finding version bump part from commit message" + message="$(Build.SourceVersionMessage)" + part="$(echo $message | cut -c 2-6)" + case "$part" + in + 'major' ) echo "##vso[task.setvariable variable=bump_part]major";; + 'minor' ) echo "##vso[task.setvariable variable=bump_part]minor";; + 'patch' ) echo "##vso[task.setvariable variable=bump_part]patch";; + * ) echo "Invalid bump part - $part" + exit 1;; + esac + displayName: Get Version Part from Commit Message + - bash: | + python -m pip install --upgrade pip && \ + pip install bump2version + condition: in(variables.bump_part, 'Minor', 'Major', 'Patch') + + curl -s "https://api.github.com/repos/webdjoe/pyvesync_v2/issues/12/labels" | jq '.[0].name' diff --git a/setup.cfg b/setup.cfg index 2776958..d3742bc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,6 +2,7 @@ current_version = 0.9.9 commit = True tag = True +tag_name = {new_version} [bdist_wheel] universal = 1 From 5c57e1dade915ae6d0614ac62b1a5b27dbf4c1ff Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 18:48:16 -0400 Subject: [PATCH 09/24] =?UTF-8?q?Bump=20version:=200.9.9=20=E2=86=92=201.0?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index d3742bc..7d53f9e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.9.9 +current_version = 1.0.0 commit = True tag = True tag_name = {new_version} @@ -15,3 +15,4 @@ testpaths = src/tests norecursedirs = .git [bumpversion:file:setup.py] + diff --git a/setup.py b/setup.py index 14ace49..14a88e9 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pyvesync_v2', - version='0.9.9', + version='1.0.0', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown', From 5bbce37bb16b3f594fd109888507591a2f7e34b0 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 18:49:28 -0400 Subject: [PATCH 10/24] =?UTF-8?q?Revert=20"Bump=20version:=200.9.9=20?= =?UTF-8?q?=E2=86=92=201.0.0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5c57e1dade915ae6d0614ac62b1a5b27dbf4c1ff. --- setup.cfg | 3 +-- setup.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 7d53f9e..d3742bc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0 +current_version = 0.9.9 commit = True tag = True tag_name = {new_version} @@ -15,4 +15,3 @@ testpaths = src/tests norecursedirs = .git [bumpversion:file:setup.py] - diff --git a/setup.py b/setup.py index 14a88e9..14ace49 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pyvesync_v2', - version='1.0.0', + version='0.9.9', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown', From 7a3e07b394119cf08374b93869c119e8336d345f Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 20:44:26 -0400 Subject: [PATCH 11/24] Update azure-pipelines-release.yml --- azure-pipelines-release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 7fb9632..db912c8 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -30,7 +30,9 @@ jobs: - bash: | python -m pip install --upgrade pip && \ pip install bump2version + bump2version $(part) --verbose + git config user.email $(gitemail) + git config user.name "Pipeline Push" + git push --tags + git push origin master condition: in(variables.bump_part, 'Minor', 'Major', 'Patch') - - curl -s "https://api.github.com/repos/webdjoe/pyvesync_v2/issues/12/labels" | jq '.[0].name' - From aecb0165de682423e3d66401e779ebcb350d409a Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 20:47:31 -0400 Subject: [PATCH 12/24] Update azure-pipelines-release.yml --- azure-pipelines-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index db912c8..fd10928 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -16,6 +16,7 @@ jobs: versionSpec: '3.7' - bash: | echo "Finding version bump part from commit message" + echo "$(Build.SourceVersionMessage)" message="$(Build.SourceVersionMessage)" part="$(echo $message | cut -c 2-6)" case "$part" @@ -35,4 +36,4 @@ jobs: git config user.name "Pipeline Push" git push --tags git push origin master - condition: in(variables.bump_part, 'Minor', 'Major', 'Patch') + condition: in(variables.bump_part, 'minor', 'major', 'patch') From d745f8e13511d2303b8b1553718c4d1d3a01ef59 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 20:50:10 -0400 Subject: [PATCH 13/24] Update azure-pipelines-release.yml --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index fd10928..0aeffeb 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -6,7 +6,7 @@ trigger: none jobs: -- job: 'Process Commit' +- job: processCommit pool: vmImage: 'ubuntu-latest' steps: From 6aea172e05a0664533bdcbb38e0b5981885979db Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 20:54:10 -0400 Subject: [PATCH 14/24] major azure CD --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 0aeffeb..1b1205a 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -18,7 +18,7 @@ jobs: echo "Finding version bump part from commit message" echo "$(Build.SourceVersionMessage)" message="$(Build.SourceVersionMessage)" - part="$(echo $message | cut -c 2-6)" + part="$(echo $message | cut -c 1-5)" case "$part" in 'major' ) echo "##vso[task.setvariable variable=bump_part]major";; From 915aa7d1d796d66e0d1c249a385e6c9d67aae81c Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:00:29 -0400 Subject: [PATCH 15/24] major update --- azure-pipelines-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 1b1205a..0a3852a 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -27,6 +27,7 @@ jobs: * ) echo "Invalid bump part - $part" exit 1;; esac + echo $part displayName: Get Version Part from Commit Message - bash: | python -m pip install --upgrade pip && \ From 2e0ba6d866656dec67a5399e98a5fff77342d83a Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:06:57 -0400 Subject: [PATCH 16/24] major CD release --- azure-pipelines-release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 0a3852a..6da8bee 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -4,7 +4,8 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/python trigger: none - +variables: + - group: creds jobs: - job: processCommit pool: @@ -32,9 +33,9 @@ jobs: - bash: | python -m pip install --upgrade pip && \ pip install bump2version - bump2version $(part) --verbose - git config user.email $(gitemail) - git config user.name "Pipeline Push" + bump2version $(bump_part) --verbose + git config --global user.email $(gitemail) + git config --global user.name "Pipeline Push" git push --tags - git push origin master + git push condition: in(variables.bump_part, 'minor', 'major', 'patch') From ac896aa1487e71c0f763dd946d6fbdcad2d6bf3c Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:09:57 -0400 Subject: [PATCH 17/24] major edit 1 --- azure-pipelines-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 6da8bee..49be15a 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -34,7 +34,7 @@ jobs: python -m pip install --upgrade pip && \ pip install bump2version bump2version $(bump_part) --verbose - git config --global user.email $(gitemail) + git config --global user.email $gitemail git config --global user.name "Pipeline Push" git push --tags git push From eb4231486d96ed18a2f6699f9f164a45d8603be1 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:15:45 -0400 Subject: [PATCH 18/24] major update --- azure-pipelines-release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 49be15a..47aa90d 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -29,13 +29,15 @@ jobs: exit 1;; esac echo $part - displayName: Get Version Part from Commit Message - - bash: | + echo $bump_part python -m pip install --upgrade pip && \ pip install bump2version - bump2version $(bump_part) --verbose - git config --global user.email $gitemail + bump2version $bump_part --verbose + git config --global user.email "$(gitemail)" git config --global user.name "Pipeline Push" git push --tags git push + displayName: Get Version Part from Commit Message + - bash: | + condition: in(variables.bump_part, 'minor', 'major', 'patch') From baf6f2ef29702b429c5c4534438af0f2a4b2b123 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:17:45 -0400 Subject: [PATCH 19/24] major update 1 --- azure-pipelines-release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 47aa90d..e53f646 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -30,6 +30,7 @@ jobs: esac echo $part echo $bump_part + python -m pip install --upgrade pip && \ pip install bump2version bump2version $bump_part --verbose @@ -37,7 +38,4 @@ jobs: git config --global user.name "Pipeline Push" git push --tags git push - displayName: Get Version Part from Commit Message - - bash: | - - condition: in(variables.bump_part, 'minor', 'major', 'patch') + displayName: Bump Version and Commit Tag From 86dd74a2bf8afb45c8a9b1ca77e955b8780c6332 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:23:32 -0400 Subject: [PATCH 20/24] major update test --- azure-pipelines-release.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index e53f646..26f2672 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -28,14 +28,16 @@ jobs: * ) echo "Invalid bump part - $part" exit 1;; esac - echo $part - echo $bump_part + echo Part "$part" + echo Bump_Part "$(bump_part)" + echo Part2 "$(part)" + echo bump_part2 "$bump_part" - python -m pip install --upgrade pip && \ - pip install bump2version - bump2version $bump_part --verbose - git config --global user.email "$(gitemail)" - git config --global user.name "Pipeline Push" - git push --tags - git push + # python -m pip install --upgrade pip && \ + # pip install bump2version + #bump2version $bump_part --verbose + #git config --global user.email "$(gitemail)" + #git config --global user.name "Pipeline Push" + #git push --tags + #git push displayName: Bump Version and Commit Tag From b2bb274a772d94ea8e1f7ad89097bd1ed19541ea Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:32:07 -0400 Subject: [PATCH 21/24] major test 2 --- azure-pipelines-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index 26f2672..c45b8d7 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -29,9 +29,9 @@ jobs: exit 1;; esac echo Part "$part" - echo Bump_Part "$(bump_part)" - echo Part2 "$(part)" - echo bump_part2 "$bump_part" + echo Bump_Part $(bump_part) + echo bump_part2 $bump_part + echo $(gitemail) # python -m pip install --upgrade pip && \ # pip install bump2version From 5054f8e13c830a56cdc4387bef8cbce6ef63aac3 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Fri, 11 Oct 2019 21:39:04 -0400 Subject: [PATCH 22/24] major test 3 --- azure-pipelines-release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index c45b8d7..621dac6 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -22,9 +22,9 @@ jobs: part="$(echo $message | cut -c 1-5)" case "$part" in - 'major' ) echo "##vso[task.setvariable variable=bump_part]major";; - 'minor' ) echo "##vso[task.setvariable variable=bump_part]minor";; - 'patch' ) echo "##vso[task.setvariable variable=bump_part]patch";; + 'major' ) echo "##vso[task.setvariable variable=bump_part;]major";; + 'minor' ) echo "##vso[task.setvariable variable=bump_part;]minor";; + 'patch' ) echo "##vso[task.setvariable variable=bump_part;]patch";; * ) echo "Invalid bump part - $part" exit 1;; esac @@ -32,6 +32,7 @@ jobs: echo Bump_Part $(bump_part) echo bump_part2 $bump_part echo $(gitemail) + echo "$(gitemail)" # python -m pip install --upgrade pip && \ # pip install bump2version From 80fbf14933db4bf951fcd7038b8901fb45a5a79b Mon Sep 17 00:00:00 2001 From: webdjoe Date: Sat, 2 Nov 2019 20:06:35 -0400 Subject: [PATCH 23/24] Remove azure release --- azure-pipelines-release.yml | 44 ------------------------------------- setup.cfg | 10 +-------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 azure-pipelines-release.yml diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml deleted file mode 100644 index 621dac6..0000000 --- a/azure-pipelines-release.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Python package -# Create and test a Python package on multiple Python versions. -# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/python - -trigger: none -variables: - - group: creds -jobs: -- job: processCommit - pool: - vmImage: 'ubuntu-latest' - steps: - - task: UsePythonVersion@0 - name: BumpPart - inputs: - versionSpec: '3.7' - - bash: | - echo "Finding version bump part from commit message" - echo "$(Build.SourceVersionMessage)" - message="$(Build.SourceVersionMessage)" - part="$(echo $message | cut -c 1-5)" - case "$part" - in - 'major' ) echo "##vso[task.setvariable variable=bump_part;]major";; - 'minor' ) echo "##vso[task.setvariable variable=bump_part;]minor";; - 'patch' ) echo "##vso[task.setvariable variable=bump_part;]patch";; - * ) echo "Invalid bump part - $part" - exit 1;; - esac - echo Part "$part" - echo Bump_Part $(bump_part) - echo bump_part2 $bump_part - echo $(gitemail) - echo "$(gitemail)" - - # python -m pip install --upgrade pip && \ - # pip install bump2version - #bump2version $bump_part --verbose - #git config --global user.email "$(gitemail)" - #git config --global user.name "Pipeline Push" - #git push --tags - #git push - displayName: Bump Version and Commit Tag diff --git a/setup.cfg b/setup.cfg index d3742bc..b98a7ec 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,3 @@ -[bumpversion] -current_version = 0.9.9 -commit = True -tag = True -tag_name = {new_version} - [bdist_wheel] universal = 1 @@ -12,6 +6,4 @@ license_file = LICENSE [tool:pytest] testpaths = src/tests -norecursedirs = .git - -[bumpversion:file:setup.py] +norecursedirs = .git \ No newline at end of file From ea17c5613919c26c5e1b5ba06ec8c1f6663cc434 Mon Sep 17 00:00:00 2001 From: webdjoe Date: Sat, 2 Nov 2019 20:08:24 -0400 Subject: [PATCH 24/24] Update version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 14ace49..14a88e9 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pyvesync_v2', - version='0.9.9', + version='1.0.0', description='pyvesync_v2 is a library to manage Etekcity Switches', long_description=long_description, long_description_content_type='text/markdown',