From a04724488d24c50c72834630f9179c15b5f1d8df Mon Sep 17 00:00:00 2001 From: Hook25 Date: Fri, 1 Nov 2024 10:20:13 +0100 Subject: [PATCH] Remove new syntax --- .github/workflows/armhf_lxd.yaml | 8 -------- tools/release/get_version.py | 27 +++++++++++++-------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/armhf_lxd.yaml b/.github/workflows/armhf_lxd.yaml index 684e9b1f3..7183ae33c 100644 --- a/.github/workflows/armhf_lxd.yaml +++ b/.github/workflows/armhf_lxd.yaml @@ -22,14 +22,6 @@ jobs: runs-on: ${{ matrix.runner_os }} name: "Build: ${{ matrix.series }} (Snapcraft ${{ matrix.snapcraft_channel }})" steps: - - name: Ubuntu 18.04 upgrade Python - if: ${{ matrix.runner_os == 'ubuntu-20.04' }} - run: | - sudo add-apt-repository ppa:deadsnakes/ppa - sudo apt -y update - sudo apt install -y -qq python3.10 - sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 - sudo update-alternatives --set python /usr/bin/python3.10 - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/tools/release/get_version.py b/tools/release/get_version.py index ea9683ae2..ea35a9a23 100755 --- a/tools/release/get_version.py +++ b/tools/release/get_version.py @@ -188,20 +188,19 @@ def bump_version( """ version_no_v = version.replace("v", "") major, minor, patch = (int(n) for n in version_no_v.split(".")) - match needed_bump: - case TraceabilityEnum.BREAKING: - major += 1 - minor = 0 - patch = 0 - case TraceabilityEnum.NEW: - minor += 1 - patch = 0 - case TraceabilityEnum.BUGFIX: - patch += 1 - case TraceabilityEnum.INFRA: - pass - case _: - raise ValueError(f"Unknown traceability marker {needed_bump}") + if needed_bump == TraceabilityEnum.BREAKING: + major += 1 + minor = 0 + patch = 0 + elif needed_bump == TraceabilityEnum.NEW: + minor += 1 + patch = 0 + elif needed_bump == TraceabilityEnum.BUGFIX: + patch += 1 + elif needed_bump == TraceabilityEnum.INFRA: + pass + else: + raise ValueError(f"Unknown traceability marker {needed_bump}") prefix = "" if output_format == OutputFormats.TAG: