From cc0104acc0b9956478f4ccd0909fee2191bb7471 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 5 Nov 2023 02:34:29 +0000 Subject: [PATCH] Update CI files [noissue] --- .github/template_gitref | 2 +- .github/workflows/release.yml | 5 ----- .github/workflows/scripts/release.py | 11 +++-------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/template_gitref b/.github/template_gitref index d03ba7e18..cd7b27530 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-249-gca8f021 +2021.08.26-250-gf4315cf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a9fc5e7a..1d740dba3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,6 @@ on: inputs: release: description: "Release tag (e.g. 3.2.1)" - required: true before_script: description: | Bash code to run before bindings and docs are built. This should only be used when re-running @@ -287,9 +286,5 @@ jobs: echo "GH Issues $GH_ISSUES" python .ci/scripts/update_github.py - - name: Tweet - continue-on-error: true - run: python .ci/scripts/tweet.py ${{ github.event.inputs.release }} - - name: Create release on GitHub run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }} diff --git a/.github/workflows/scripts/release.py b/.github/workflows/scripts/release.py index c3f342632..5c847af17 100755 --- a/.github/workflows/scripts/release.py +++ b/.github/workflows/scripts/release.py @@ -10,6 +10,7 @@ import os import textwrap import requests +import subprocess from git import Repo from pathlib import Path @@ -152,14 +153,8 @@ def main(): release_path = os.path.dirname(os.path.abspath(__file__)) plugin_path = release_path.split("/.github")[0] - version = None - with open(f"{plugin_path}/setup.py") as fp: - for line in fp.readlines(): - if "version=" in line: - version = re.split("\"|'", line)[1] - if not version: - raise RuntimeError("Could not detect existing version ... aborting.") - release_version = version.replace(".dev", "") + output = subprocess.check_output(["bump2version", "--dry-run", "--list", "release"]) + release_version = re.findall(r"\nnew_version=([0-9.]*)\n", output.decode())[0] print(f"\n\nRepo path: {plugin_path}") repo = Repo(plugin_path)