Pub: support git refs via pub global activate

Created on 5 Jun 2015  路  3Comments  路  Source: dart-lang/pub

Issue by kevmoo
_Originally opened as dart-lang/sdk#23524_


pub global activate --source git [path] only supports the primary branch it seems.

No way to specify another rev/ref/etc

enhancement help wanted pub run

Most helpful comment

If one is using some package for Dart/Flutter project, there is a workaround:

Instead of

$ flutter pub global activate package_name
$ executable_name

do this:

  • In your project's pubspec.yaml file:
dev_dependencies:
  package_name:
    git:
      url: https://github.com/munificent/kittens.git
      ref: commit / branch / tag / etc
$ flutter pub get



md5-eccfc4da311bb00d6ff41ad9b96380a7



$ flutter pub run package_name:executable_command



md5-e5168839602f79bec49a5224e1d64ac3



executables:
  executable_name: executable_command

All 3 comments

Any updates on this?

I up this, would be a nice feature.

If one is using some package for Dart/Flutter project, there is a workaround:

Instead of

$ flutter pub global activate package_name
$ executable_name

do this:

  • In your project's pubspec.yaml file:
dev_dependencies:
  package_name:
    git:
      url: https://github.com/munificent/kittens.git
      ref: commit / branch / tag / etc
$ flutter pub get



md5-eccfc4da311bb00d6ff41ad9b96380a7



$ flutter pub run package_name:executable_command



md5-e5168839602f79bec49a5224e1d64ac3



executables:
  executable_name: executable_command
Was this page helpful?
0 / 5 - 0 ratings