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

support git refs via pub global activate #29

Closed
DartBot opened this issue Jun 4, 2015 · 5 comments
Closed

support git refs via pub global activate #29

DartBot opened this issue Jun 4, 2015 · 5 comments
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 4, 2015

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="96" height="96"hspace="10"> 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

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) Pub-Run labels Jun 4, 2015
@nex3 nex3 added type-enhancement A request for a change that isn't a bug and removed type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Dec 9, 2015
@sh4869
Copy link

sh4869 commented Mar 4, 2016

Any updates on this?

@daniel-v
Copy link

I up this, would be a nice feature.

@jonasfj jonasfj added the contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) label Mar 5, 2019
@PiN73
Copy link

PiN73 commented Feb 18, 2021

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
$ flutter pub run package_name:executable_command

What is executable_command? You can find it out in the package_name's pubspec.yaml where it will be

executables:
  executable_name: executable_command

@mrverdant13
Copy link

Still a pretty interesting feature.

@sigurdm
Copy link
Contributor

sigurdm commented Jan 13, 2023

This has worked for a while.

eg:

dart pub global activate --source git https://github.com/dart-lang/pub --git-ref=75c671c7d65db43f197b55419a8519906a611730

Works

@sigurdm sigurdm closed this as completed Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome Contributions welcome to help resolve this (the resolution is expected to be clear from the issue) type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

8 participants