Skip to content

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

@jenstroeger

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.

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