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

Dub --version= enhancements #657

Closed
Abscissa opened this issue Aug 19, 2015 · 1 comment
Closed

Dub --version= enhancements #657

Abscissa opened this issue Aug 19, 2015 · 1 comment

Comments

@Abscissa
Copy link
Contributor

It may be helpful, especially if we don't have #103, to be able to use --version like this:

$ dub fetch somepackage --version=~>1.2.0
$ dub fetch somepackage "--version=>=1.3.0 <=1.3.4"
$ dub describe somepackage [--data=... or not] --version=1.2.4
$ dub describe somepackage [--data=... or not] --version=~>1.2.0

(Note that currently, dub describe doesn't support --version= at all.)

That way you could do:

$ cat hi.d
// Needs libfoobar v1.2.x
import foobar : foo;
void main() { foo(); }

$ cat hi.sh
#!/bin/sh
dub fetch foobar -q --version=~1.2.0
dub describe foobar --version=~1.2.0 --data-0 --data=import-paths | xargs -0 -I % rdmd % hi.d

$ ./hi.sh
Works!
@WebFreak001
Copy link
Member

package versions can be specified with pkgname@1.0.0 now. You can get the latest version, but not a version range.

This syntax should work with most, if not all, dub commands.

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

No branches or pull requests

2 participants