-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to specify version specification for commandline commands
As mentioned in the changelog, it was not possible with all commands. No breaking changes are expected.
- Loading branch information
Showing
3 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
changelog/add-ability-for-specify-version-range-for-commandline-commands.dd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
All commands now accept a version specification | ||
|
||
Before this release dub could only get an exact version for some commands | ||
(`describe`, `generate`, `fetch`, etc...). All commands now accept a version specification, | ||
such as can be found in `dub.json` / `dub.sdl`: | ||
|
||
dub fetch 'foo@>0.2.0' | ||
dub describe foo@'>=0.3.0 <1.0.0' | ||
|
||
Note that commands such as `describe` will still not fetch from the network. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,13 @@ $DUB add-local "$CURR_DIR/version-spec/oldfoo" | |
[[ $($DUB describe [email protected] | grep path | head -n 1) == *"/newfoo/"* ]] | ||
[[ $($DUB describe [email protected] | grep path | head -n 1) == *"/oldfoo/"* ]] | ||
|
||
[[ $($DUB describe foo@'<1.0.0' | grep path | head -n 1) == *"/oldfoo/"* ]] | ||
[[ $($DUB describe foo@'>0.1.0' | grep path | head -n 1) == *"/newfoo/"* ]] | ||
[[ $($DUB describe foo@'>0.2.0' | grep path | head -n 1) == *"/newfoo/"* ]] | ||
[[ $($DUB describe foo@'<=0.2.0' | grep path | head -n 1) == *"/oldfoo/"* ]] | ||
[[ $($DUB describe foo@'*' | grep path | head -n 1) == *"/newfoo/"* ]] | ||
[[ $($DUB describe foo@'>0.0.1 <2.0.0' | grep path | head -n 1) == *"/newfoo/"* ]] | ||
|
||
[[ $($DUB test foo | head -n 1) == *"/newfoo/" ]] | ||
[[ $($DUB test [email protected] | head -n 1) == *"/newfoo/" ]] | ||
[[ $($DUB test [email protected] | head -n 1) == *"/oldfoo/" ]] | ||
|