From 531f149a60b18cb9235832c5f78153abfdb9b99c Mon Sep 17 00:00:00 2001 From: Nathan Gardiner Date: Tue, 12 Mar 2024 22:50:16 +1100 Subject: [PATCH] release v1.3.2 --- .github/workflows/docker+pypi.yml | 48 ++++++++++++++++++++++++++++++- CHANGELOG.md | 3 ++ README.md | 4 +-- docs/Software_Manual.md | 4 +-- lib/TWCManager/TWCMaster.py | 2 +- setup.py | 2 +- 6 files changed, 56 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker+pypi.yml b/.github/workflows/docker+pypi.yml index 5266106e..2d4e0077 100644 --- a/.github/workflows/docker+pypi.yml +++ b/.github/workflows/docker+pypi.yml @@ -155,7 +155,7 @@ jobs: runs-on: [ "self-hosted", "build_host" ] if: | - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || + (vars.build_env == 'self-hosted' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.trigger_pypi_prod == 'yes') steps: @@ -197,6 +197,52 @@ jobs: with: password: ${{ secrets.PYPI_API_TOKEN }} + pypi-cloud: + name: Build a PyPi Package if this is a tagged release commit + runs-on: ubuntu-latest + + if: | + (vars.build_env == 'cloud' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) || + (github.event_name == 'workflow_dispatch' && github.event.inputs.trigger_pypi_prod == 'yes') + + steps: + - name: Check out Repository + uses: actions/checkout@v3 + with: + path: ./pypi + + - name: Set up Python 3.7 + uses: actions/setup-python@v4 + with: + python-version: 3.7 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + - name: Publish distribution package to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + skip_existing: true + repository_url: https://test.pypi.org/legacy/ + + - name: Publish distribution package to Production PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} + docker-latest: name: Create docker-latest Docker Image from current head runs-on: [ "self-hosted", "build_host" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f788f5..f20ba3d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ This document logs the changes per release of TWCManager. +## v1.4.0 - Upcoming Development release +* Placeholder - TWC abstraction code + ## v1.3.2 - Latest Development version * (@RichieB2B) - Nicer looking log prefixes for EMS modules * (@RichieB2B) - Support for new fleet API and vehicle command proxy diff --git a/README.md b/README.md index 2bd7ace8..6705e66d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # TWCManager -[![Stable Release](https://img.shields.io/badge/Stable_Release-1.3.1-blue)](https://github.com/ngardiner/TWCManager/releases/tag/v1.3.1) -[![Development Release](https://img.shields.io/badge/Devel_Release-1.3.2-green.svg)](https://github.com/ngardiner/TWCManager/tree/main) +[![Stable Release](https://img.shields.io/badge/Stable_Release-1.3.2-blue)](https://github.com/ngardiner/TWCManager/releases/tag/v1.3.2) +[![Development Release](https://img.shields.io/badge/Devel_Release-1.4.0-green.svg)](https://github.com/ngardiner/TWCManager/tree/main) ![Build Status](https://github.com/ngardiner/TWCManager/actions/workflows/test_suite.yml/badge.svg) ![GitHub commits](https://img.shields.io/github/commit-activity/m/ngardiner/TWCManager) ![Docker Pulls](https://img.shields.io/docker/pulls/twcmanager/twcmanager.svg) diff --git a/docs/Software_Manual.md b/docs/Software_Manual.md index 596bfcbd..eb6d492f 100644 --- a/docs/Software_Manual.md +++ b/docs/Software_Manual.md @@ -74,13 +74,13 @@ You can check that this command has been successful by running ```python --versi During this step, the source code and all related files will be cloned from the GitHub repository and installed into the appropriate location on your system. -We have two versions of the codebase that you may want to check out. The stable version is **v1.3.1**, which will only change for stability or urgent fixes. To check out **v1.3.1**, follow these steps: +We have two versions of the codebase that you may want to check out. The stable version is **v1.3.2**, which will only change for stability or urgent fixes. To check out **v1.3.2**, follow these steps: ``` git clone https://github.com/ngardiner/TWCManager cd TWCManager -git checkout v1.3.1 +git checkout v1.3.2 sudo make install ``` diff --git a/lib/TWCManager/TWCMaster.py b/lib/TWCManager/TWCMaster.py index bb816eba..bea7fc9f 100644 --- a/lib/TWCManager/TWCMaster.py +++ b/lib/TWCManager/TWCMaster.py @@ -67,7 +67,7 @@ class TWCMaster: teslaLoginAskLater = False TWCID = None updateVersion = False - version = "1.3.1" + version = "1.3.2" # TWCs send a seemingly-random byte after their 2-byte TWC id in a number of # messages. I call this byte their "Sign" for lack of a better term. The byte diff --git a/setup.py b/setup.py index 2f0eec3e..6af7928a 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name="TWCManager", - version="1.3.1", + version="1.3.2", package_dir={"": "lib"}, packages=find_namespace_packages(where="lib"), python_requires=">= 3.6",