From 14ce0f525daa90f94c1bf207c04fd621a1c426f4 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 15 Jul 2024 10:47:48 +0200 Subject: [PATCH] Fix multiple tags, loosen napari-plugin-manager pin (#167) * Unpin setuptools * Keep only latest tag for given commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Obtain current ref from git log directly * Revert debugging * More generous pin for napari-plugin-manager --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/make_bundle_conda.yml | 30 +++++++++++++++++++++++- conda-recipe/meta.yaml | 2 +- environments/ci_packages_environment.yml | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make_bundle_conda.yml b/.github/workflows/make_bundle_conda.yml index b90c6b72..aaff0831 100644 --- a/.github/workflows/make_bundle_conda.yml +++ b/.github/workflows/make_bundle_conda.yml @@ -86,6 +86,20 @@ jobs: with: environment-file: napari-packaging/environments/ci_packages_environment.yml + - name: Prevent issues with multiple tags + shell: bash -el {0} + if: github.event.inputs.ref || github.ref_type == 'tag' + working-directory: napari-source + run: | + set -x + ref=$(git log -1 --format='%H') + last_tag=$(git tag --list --points-at "$ref" --sort creatordate | tail -1) + for tag in $(git tag --list --points-at "$ref" --sort creatordate); do + if [[ $tag != $last_tag ]]; then + git tag --delete $tag + fi + done + - name: install napari shell: bash -el {0} working-directory: napari-source @@ -268,7 +282,21 @@ jobs: conda config --show-sources mkdir -p ${CONDA_BLD_PATH}/noarch - - name: set up build dependencies + - name: Prevent issues with multiple tags + shell: bash -el {0} + if: github.event.inputs.ref || github.ref_type == 'tag' + working-directory: napari-source + run: | + set -x + ref=$(git log -1 --format='%H') + last_tag=$(git tag --list --points-at "$ref" --sort creatordate | tail -1) + for tag in $(git tag --list --points-at "$ref" --sort creatordate); do + if [[ $tag != $last_tag ]]; then + git tag --delete $tag + fi + done + + - name: Install napari shell: bash -el {0} working-directory: napari-source run: | diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index b216016f..e595c7fe 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -79,7 +79,7 @@ outputs: - zarr >=2.12.0 run_constrained: - - napari-plugin-manager >=0.1.0a2,<0.2.0a0 + - napari-plugin-manager >=0.1.0a2,<0.3.0a0 - pyside2 >=5.13.2,!=5.15.0 - pyside6 <6.5,>=6.7 - pyqt >=5.12.3,!=5.15.0,<6.0a0|>=6.5,!=6.6.1 diff --git a/environments/ci_packages_environment.yml b/environments/ci_packages_environment.yml index 6396dc57..571f0ae4 100644 --- a/environments/ci_packages_environment.yml +++ b/environments/ci_packages_environment.yml @@ -8,4 +8,4 @@ dependencies: - tomlkit - ruamel.yaml - anaconda-client - - setuptools <66.0a + - setuptools