Added better url detection to publish
Publish will now look at the hostname part of the ssh url to figure out what git server to use. This definitely works with both github and gitlab, and adds gitlab support to `nimble publish`.
This commit is contained in:
parent
e756a14c15
commit
4a78953fc6
1 changed files with 1 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ proc publish*(p: PackageInfo, o: Options) =
|
|||
if parsed.scheme == "":
|
||||
# Assuming that we got an ssh write/read URL.
|
||||
let sshUrl = parseUri("ssh://" & url)
|
||||
url = "https://github.com/" & sshUrl.port & sshUrl.path
|
||||
url = "https://" & sshUrl.hostname & "/" & sshUrl.port & sshUrl.path
|
||||
elif dirExists(os.getCurrentDir() / ".hg"):
|
||||
downloadMethod = "hg"
|
||||
# TODO: Retrieve URL from hg.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue