Skip to content

The hatch release workflow could be more robust #163

@liamhuber

Description

@liamhuber

In particular, one gets rather cryptic errors from pypi when _version.py exists. Basically, when it's already there and tracked and hatch auto-generates it, this winds up showing as a diff and screws up the release tag. Cf. the even that brought this to our attention in pyiron/semantikon#387.

We could make the workflow more robust with something like (Claude suggestion):

- name: Check for tracked version file
  shell: bash -l {0}
  run: |
    if git ls-files --error-unmatch "${{ steps.version-file.outputs.vfile }}" 2>/dev/null; then
      echo "::error::Version file '${{ steps.version-file.outputs.vfile }}' is tracked by git. This will cause dirty builds. Remove it from version control."
      exit 1
    fi

But it's a bit of an edge case and can be easily avoided so I'm not sure I want to go that far

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions