From fe2fa3e44ce5a51fba750b8627bd7441bb4df342 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 17 Nov 2024 23:32:20 +0000 Subject: [PATCH] Update CI files --- .ci/assets/release_requirements.txt | 2 +- .github/template_gitref | 2 +- .github/workflows/create-branch.yml | 6 +++--- .github/workflows/lint.yml | 3 ++- .github/workflows/release.yml | 2 +- .github/workflows/scripts/release.sh | 7 ++++--- lint_requirements.txt | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.ci/assets/release_requirements.txt b/.ci/assets/release_requirements.txt index c064e9477..6635a8723 100644 --- a/.ci/assets/release_requirements.txt +++ b/.ci/assets/release_requirements.txt @@ -1,3 +1,3 @@ -bump2version +bump-my-version gitpython towncrier diff --git a/.github/template_gitref b/.github/template_gitref index 280a7ea4b..d37a43c86 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-392-g4ba515c +2021.08.26-393-g0e700c1 diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml index 8de516d29..49ca9c51b 100644 --- a/.github/workflows/create-branch.yml +++ b/.github/workflows/create-branch.yml @@ -39,7 +39,7 @@ jobs: - name: "Install python dependencies" run: | echo ::group::PYDEPS - pip install bump2version packaging -r plugin_template/requirements.txt + pip install bump-my-version packaging -r plugin_template/requirements.txt echo ::endgroup:: - name: "Setting secrets" @@ -54,7 +54,7 @@ jobs: run: | # Just to be sure... git checkout main - NEW_BRANCH="$(bump2version --dry-run --list release | sed -Ene 's/^new_version=([[:digit:]]+\.[[:digit:]]+)\..*$/\1/p')" + NEW_BRANCH="$(bump-my-version show new_version --increment release | sed -Ene 's/^([[:digit:]]+\.[[:digit:]]+)\.[[:digit:]]+$/\1/p')" if [ -z "$NEW_BRANCH" ] then echo Could not determine the new branch name. @@ -70,7 +70,7 @@ jobs: - name: Bump version on main branch working-directory: pulp_rpm run: | - bump2version --no-commit minor + bump-my-version bump --no-commit minor - name: Remove entries from CHANGES directory working-directory: pulp_rpm diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 26396aa0b..6795ab4f5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,7 +40,8 @@ jobs: - name: "Verify bump version config" run: | - bump2version --dry-run --list release + bump-my-version bump --dry-run release + bump-my-version show-bump # run black separately from flake8 to get a diff - name: "Run black" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a37e75411..26e89258b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: "Install python dependencies" run: | echo ::group::PYDEPS - pip install bump2version towncrier + pip install bump-my-version towncrier echo ::endgroup:: - name: "Configure Git with pulpbot name and email" diff --git a/.github/workflows/scripts/release.sh b/.github/workflows/scripts/release.sh index 9525f229d..a08353cdb 100755 --- a/.github/workflows/scripts/release.sh +++ b/.github/workflows/scripts/release.sh @@ -10,7 +10,8 @@ then exit 1 fi -NEW_VERSION="$(bump2version --dry-run --list release | sed -ne 's/^new_version=//p')" +# The tail is a necessary workaround to remove the warning from the output. +NEW_VERSION="$(bump-my-version show new_version --increment release | tail -n -1)" echo "Release ${NEW_VERSION}" if ! [[ "${NEW_VERSION}" == "${BRANCH}"* ]] @@ -20,7 +21,7 @@ then fi towncrier build --yes --version "${NEW_VERSION}" -bump2version release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty -bump2version patch --commit +bump-my-version bump release --commit --message "Release {new_version}" --tag --tag-name "{new_version}" --tag-message "Release {new_version}" --allow-dirty +bump-my-version bump patch --commit git push origin "${BRANCH}" "${NEW_VERSION}" diff --git a/lint_requirements.txt b/lint_requirements.txt index 30d6896a7..6f8f0086b 100644 --- a/lint_requirements.txt +++ b/lint_requirements.txt @@ -6,7 +6,7 @@ # For more info visit https://github.com/pulp/plugin_template black==24.3.0 -bump2version +bump-my-version check-manifest flake8 flake8-black