File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,29 @@ The ref can be anything that Git allows to [identify a commit.][commit]
171
171
172
172
[commit] : https://www.kernel.org/pub/software/scm/git/docs/user-manual.html#naming-commits
173
173
174
+ If the package you depend on has tagged the revision of each version of the
175
+ package, you can use `tag_pattern` instead of `ref`, together with a version
176
+ constraint.
177
+
178
+ Pub will then query Git for all matching tags, and feed those version to the
179
+ version solver.
180
+
181
+ ` ` ` yaml
182
+ dependencies:
183
+ kittens:
184
+ git:
185
+ url: [email protected] :munificent/kittens.git
186
+ tag_pattern: v{{version}} # Find version-tag prefixed by 'v'.
187
+ version: ^2.0.1
188
+ ` ` `
189
+
190
+ :::version-note
191
+ Support for `tag_pattern` was introduced in Dart 3.9.0.
192
+
193
+ To use pub workspaces, the including pubspec (but not the dependency)
194
+ must have an SDK version constraint of `^3.9.0` or higher.
195
+ :: :
196
+
174
197
Pub assumes that the package is in the root of the Git repository. To specify a
175
198
different location in the repo, specify a `path` relative to the repository
176
199
root :
You can’t perform that action at this time.
0 commit comments