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

xchangelog: try repo db if template not available #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tornaria
Copy link
Contributor

@tornaria tornaria commented May 6, 2023

When either

  1. the template is not available (maybe repo is not checked out)
  2. the template does not define changelog=

This will try (in order) to get the changelog property from the local db / remote repo.

Usecases:

  • user doesn't have the repo checked out, get the changelog from the package (first from local, saves one network roundtrip for installed packages, then from remote so it works for uninstalled packages)
  • maintainer has an updated version of package locally built and installed in system; this updated package added a changelog property but the template in the checked out repo doesn't have the changelog property yet.

Arguably, the property from locally installed package should take precedence (this is important if the changelog was changed) but I didn't want to alter the behaviour for anyone already using this tool.

cc: @mhmdanas @classabbyamp

if [ -z "$changelog" ]; then
echo "No changelog defined in template" >&2
echo "changelog not available" >&2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "changelog not available" >&2
echo "No changelog found" >&2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants