Compare commits

...

2 Commits

Author SHA1 Message Date
758d01ff1e fcl: Parse more repo urls 2024-08-18 21:38:10 +10:00
8c8f123f5f fcl: Fail if unable to fetch config 2024-08-02 18:25:26 +10:00

6
fcl
View File

@ -42,8 +42,8 @@ def repo_url(repo_str)
# GitHub HTTPS. We like these, use it as-is. # GitHub HTTPS. We like these, use it as-is.
when /^(git|https)\:\/\/github\.com\// when /^(git|https)\:\/\/github\.com\//
repo_str repo_str
# Other HTTPS. Assume it's fine? # Some other HTTPS. This is probably fine too, as long as it ends with '.git'
when /^https\:\/\// when /^(git|https)\:\/\/.+\.git$/
repo_str repo_str
# GitHub SSH. Let's convert this to HTTPS. # GitHub SSH. Let's convert this to HTTPS.
when /^git@github\.com\:.+\.git$/ when /^git@github\.com\:.+\.git$/
@ -66,7 +66,7 @@ def destination_path(repo_str)
repo_elms = repo_str.split('/') repo_elms = repo_str.split('/')
repo = repo_elms.pop.sub(/\.git$/, '') repo = repo_elms.pop.sub(/\.git$/, '')
org = repo_elms.pop || Config['FCL_DEFAULT_ORG'] org = repo_elms.pop || Config.fetch('FCL_DEFAULT_ORG')
forge = repo_elms.pop || 'github.com' forge = repo_elms.pop || 'github.com'
File.join(forge, org, repo) File.join(forge, org, repo)