Skip to content

Add 'tag_pattern' feature to git dependencies #4427

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Nov 15, 2024

Re: #1250

With this proposal you can use a git repo as a versioned package repository.

For example write:

dependencies:
  foo:
    git:
      url: https://github.com/foo/foo
      tag_pattern: v{{version}}
    version: ^2.0.0

And all commits in the git repo that are tagged according to v{{version}} will be inspected. If they contain a pubspec.yaml with name: foo and the correct version number they will be considered for resolution.

This feature is explicitly opt-in:

  • any git dependency without a tag_pattern retain the existing behavior.
  • The depending pubspec need to be at least at version 3.9.0

Comment on lines -84 to +78
required Description containingDescription,
required ResolvedDescription containingDescription,
Copy link
Member

Choose a reason for hiding this comment

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

I kind of wish this migration could have been done in steps.

  1. Change Description -> ResolvedDescription
  2. Move hasMultipleVersions
  3. Adopt usage of hasMultipleVersions instead of is HostedSource
  4. ..
  5. Support for tag-pattern

But I can also see how it would cause a lot of conflicts to do that.

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.

2 participants