Skip to content

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

Open

Description

@jenstroeger

If that file is missing then

CURRENT_VERSION=$(test -f repo/.github/workflows/.template_version \
&& cat repo/.github/workflows/.template_version || echo "v0.0.0")

sets CURRENT_VERSION to "v0.0.0" such that

git diff "$CURRENT_VERSION..$LATEST_VERSION" "$(find . docs/ .github/ .github/workflows/ .github/codeql/ -maxdepth 1 -type f ! -name """*.md""" ! -name """.template_version""")" > diff.patch

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.

Activity

  1. changed the title [-]Synchronizing with an upstream template repository fails if the `.template_version` file is missing.[/-] [+]Synchronizing with an upstream template repository fails if the `.template_version` contains an incorrect tag.[/+] on Dec 8, 2023
  2. added
    bugSomething isn't working
    ciImprovements or additions to CI checks
    on Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingciImprovements or additions to CI checks

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions