Fixes problem with subdirs and 'develop'. Documents package urls.
This commit is contained in:
parent
25ffe273f7
commit
7e3058657c
3 changed files with 20 additions and 3 deletions
|
|
@ -183,8 +183,17 @@ the current working directory. This can be useful for developers who are testing
|
|||
locally their ``.nimble`` files before submitting them to the official package
|
||||
list. See the [Creating Packages](#creating-packages) section for more info on this.
|
||||
|
||||
A URL to a repository can also be specified, Nimble will automatically detect
|
||||
the type of the repository that the url points to and install it.
|
||||
#### Package URLs
|
||||
|
||||
A valid URL to a Git or Merurial repository can also be specified, Nimble will
|
||||
automatically detect the type of the repository that the url points to and
|
||||
install it.
|
||||
|
||||
For repositories containing the Nimble package in a subdirectory, you can
|
||||
instruct Nimble about the location of your package using the ``?subdir=<path>``
|
||||
query parameter. For example:
|
||||
|
||||
$ nimble install https://github.com/nimble-test/multi?subdir=alpha
|
||||
|
||||
### nimble develop
|
||||
|
||||
|
|
@ -206,6 +215,9 @@ current working directory.
|
|||
The ``jester`` package will be cloned into ``./jester`` and it will be linked
|
||||
to your installation directory.
|
||||
|
||||
Just as with the ``install`` command, a package URL may also be specified
|
||||
instead of a name.
|
||||
|
||||
### nimble uninstall
|
||||
|
||||
The ``uninstall`` command will remove an installed package. Attempting to remove
|
||||
|
|
|
|||
|
|
@ -1012,7 +1012,7 @@ proc develop(options: Options) =
|
|||
let (meth, url, metadata) = getDownloadInfo(pv, options, true)
|
||||
let subdir = metadata.getOrDefault("subdir")
|
||||
discard downloadPkg(url, pv.ver, meth, subdir, options, downloadDir)
|
||||
developFromDir(downloadDir, options)
|
||||
developFromDir(downloadDir / subdir, options)
|
||||
|
||||
proc test(options: Options) =
|
||||
## Executes all tests.
|
||||
|
|
|
|||
|
|
@ -679,4 +679,9 @@ suite "check command":
|
|||
suite "multi":
|
||||
test "can install package from git subdir":
|
||||
let args = ["install", "-y", "https://github.com/nimble-test/multi?subdir=alpha"]
|
||||
check execNimble(args).exitCode == QuitSuccess
|
||||
|
||||
test "can develop package from git subdir":
|
||||
removeDir("nimble-test/multi")
|
||||
let args = ["develop", "-y", "https://github.com/nimble-test/multi?subdir=beta"]
|
||||
check execNimble(args).exitCode == QuitSuccess
|
||||
Loading…
Add table
Add a link
Reference in a new issue