From 974f47d7e34aea34e1d83cabdbf24fde8305d151 Mon Sep 17 00:00:00 2001 From: Calvin Remsburg Date: Tue, 19 Mar 2024 09:57:25 -0500 Subject: [PATCH 1/3] Add support for -b option in parse_version function --- pan_os_upgrade/components/utilities.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pan_os_upgrade/components/utilities.py b/pan_os_upgrade/components/utilities.py index b8c3639..73ec774 100644 --- a/pan_os_upgrade/components/utilities.py +++ b/pan_os_upgrade/components/utilities.py @@ -956,6 +956,8 @@ def parse_version(version: str) -> Tuple[int, int, int, int]: maintenance_str, hotfix_str = maintenance_part.split("-h") elif "-c" in maintenance_part: maintenance_str, hotfix_str = maintenance_part.split("-c") + elif "-b" in maintenance_part: + maintenance_str, hotfix_str = maintenance_part.split("-b") else: maintenance_str = maintenance_part hotfix_str = "0" From 2a78a4dfd6a35f0c94e6cca79f5ec5527b05364b Mon Sep 17 00:00:00 2001 From: Calvin Remsburg Date: Tue, 19 Mar 2024 09:58:37 -0500 Subject: [PATCH 2/3] Update pan-os-upgrade to version 1.3.9 --- docker/Dockerfile | 4 ++-- docs/about/release-notes.md | 8 ++++++++ pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index b898a96..1dbeea4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,8 +15,8 @@ WORKDIR /app COPY settings.yaml /app # Install any needed packages specified in requirements.txt -# Note: The requirements.txt should contain pan-os-upgrade==1.3.8 -RUN pip install --no-cache-dir pan-os-upgrade==1.3.8 +# Note: The requirements.txt should contain pan-os-upgrade==1.3.9 +RUN pip install --no-cache-dir pan-os-upgrade==1.3.9 # Set the locale to avoid issues with emoji rendering ENV LANG C.UTF-8 diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 605a300..e6a04ba 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -2,6 +2,14 @@ Welcome to the release notes for the `pan-os-upgrade` tool. This document provides a detailed record of changes, enhancements, and fixes in each version of the tool. +## Version 1.3.9 + +**Release Date:** *<20240319>* + +### What's New in version 1.3.9 + +- Added support for beta releases with `-b` in their PAN-OS version names + ## Version 1.3.8 **Release Date:** *<20240318>* diff --git a/pyproject.toml b/pyproject.toml index 16b52ac..7fee20c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pan-os-upgrade" -version = "1.3.8" +version = "1.3.9" description = "Python script to automate the upgrade process of PAN-OS firewalls." authors = ["Calvin Remsburg "] documentation = "https://cdot65.github.io/pan-os-upgrade/" From 5ec006299ae7f7b1a66451006609ca228249f606 Mon Sep 17 00:00:00 2001 From: Calvin Remsburg Date: Tue, 19 Mar 2024 10:00:58 -0500 Subject: [PATCH 3/3] Add support for version 11.1.2-b1 in parse_version function --- tests/test_parse_version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_parse_version.py b/tests/test_parse_version.py index 08e3654..18bc2f4 100644 --- a/tests/test_parse_version.py +++ b/tests/test_parse_version.py @@ -10,6 +10,7 @@ ("1.0.0", (1, 0, 0, 0)), ("2.5.3", (2, 5, 3, 0)), ("4.2.0-h1", (4, 2, 0, 1)), + ("11.1.2-b1", (11, 1, 2, 1)), ("3.10.4-h2", (3, 10, 4, 2)), ("0.9.0-h0", (0, 9, 0, 0)), ("6.3.5-c1", (6, 3, 5, 1)),