python-package-template icon indicating copy to clipboard operation
python-package-template copied to clipboard

Synchronizing with an upstream template repository fails if the `.template_version` contains an incorrect tag.

Open jenstroeger opened this issue 2 years ago • 0 comments

If that file is missing then

https://github.com/jenstroeger/python-package-template/blob/40e438b0adab9e4d90f754811bba7a1284d592d9/.github/workflows/sync-with-upstream.yaml#L49-L50

sets CURRENT_VERSION to "v0.0.0" such that

https://github.com/jenstroeger/python-package-template/blob/40e438b0adab9e4d90f754811bba7a1284d592d9/.github/workflows/sync-with-upstream.yaml#L66

results in an error:

fatal: ambiguous argument 'v0.0.0..v2.8.0': unknown revision or path not in the working tree.

I think we should return a valid template tag here, or fail the workflow more gracefully. That error is also caused if the file exists and contains an invalid/non-existent tag.

jenstroeger avatar Dec 08 '23 12:12 jenstroeger