Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jenstroeger opened this issue Dec 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working ci Improvements or additions to CI checks

Comments

@jenstroeger
Copy link
Owner

jenstroeger commented Dec 8, 2023

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.

@jenstroeger jenstroeger 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. Dec 8, 2023
@jenstroeger jenstroeger added bug Something isn't working ci Improvements or additions to CI checks labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci Improvements or additions to CI checks
Projects
None yet
Development

No branches or pull requests

2 participants