From b8b88d4e7628ef67f3b2e6915466a7b2073824b6 Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:39:15 -0500 Subject: [PATCH] minor fixes --- hooks/post_gen_project.py | 1 + .../.github/workflows/bump-version.yml | 2 ++ .../.github/workflows/dependency-review.yml | 2 +- {{cookiecutter.project_slug}}/.readthedocs.yml | 2 +- {{cookiecutter.project_slug}}/environment-dev.yml | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 69079d2ba..2c8bf20ac 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -24,6 +24,7 @@ def remove_folder(folder_path): def replace_contents(filepath): replacements = { "__BUMP_VERSION_TOKEN__": "secrets.BUMP_VERSION_TOKEN", + "__ENV_CURRENT_VERSION__": "env.CURRENT_VERSION", "__GITHUB_REF__": "github.ref", "__GITHUB_REF_NAME__": "github.ref_name", "__GITHUB_TOKEN__": "secrets.GITHUB_TOKEN", diff --git a/{{cookiecutter.project_slug}}/.github/workflows/bump-version.yml b/{{cookiecutter.project_slug}}/.github/workflows/bump-version.yml index 848f522c6..d47c8c931 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/bump-version.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/bump-version.yml @@ -75,6 +75,8 @@ jobs: - name: Current Version run: | bump-my-version show current_version + CURRENT_VERSION="$(grep -E '__version__' xclim/__init__.py | cut -d ' ' -f3)" + echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV - name: Conditional Bump Version run: | if [[ __ENV_CURRENT_VERSION__ =~ -dev(\.\d+)? ]]; then diff --git a/{{cookiecutter.project_slug}}/.github/workflows/dependency-review.yml b/{{cookiecutter.project_slug}}/.github/workflows/dependency-review.yml index bfe444fd3..c977388df 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/dependency-review.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/dependency-review.yml @@ -28,4 +28,4 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: 'Dependency Review' - uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d97 + uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 diff --git a/{{cookiecutter.project_slug}}/.readthedocs.yml b/{{cookiecutter.project_slug}}/.readthedocs.yml index 96dc4e7ca..2cbc95b10 100644 --- a/{{cookiecutter.project_slug}}/.readthedocs.yml +++ b/{{cookiecutter.project_slug}}/.readthedocs.yml @@ -16,7 +16,7 @@ build: python: "mambaforge-22.9" jobs: pre_build: - - sphinx-apidoc -o docs/apidoc --private --module-first ${{ cookiecutter.project_slug }} + - sphinx-apidoc -o docs/apidoc --private --module-first {{ cookiecutter.project_slug }} {%- if cookiecutter.add_translations == 'y' %} - sphinx-build -M gettext docs docs/_build {%- endif %} diff --git a/{{cookiecutter.project_slug}}/environment-dev.yml b/{{cookiecutter.project_slug}}/environment-dev.yml index b8cf59cb2..02c0795c9 100644 --- a/{{cookiecutter.project_slug}}/environment-dev.yml +++ b/{{cookiecutter.project_slug}}/environment-dev.yml @@ -21,7 +21,7 @@ dependencies: - pytest-cov>=4.0.0 {%- endif %} {%- if cookiecutter.use_black == 'y' %} - - black ==24.11.1 + - black ==24.1.1 - blackdoc ==0.3.9 - isort ==5.13.2 {%- endif %}