Kiln » gitkiln Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

allow inferring SSH paths for Kiln On Demand

Changeset 3f41713512ac

Parent 80b4194d51bf

by Benjamin Pollack

Changes to one file · Browse files at 3f41713512ac Showing diff from parent 80b4194d51bf Diff from another changeset...

Change 1 of 1 Show Entire File main.go Stacked
 
67
68
69
 
 
 
 
 
 
 
70
71
72
 
67
68
69
70
71
72
73
74
75
76
77
78
79
@@ -67,6 +67,13 @@
  if err == nil && len(out) > 0 {   base, err = url.Parse(strings.TrimSpace(string(out)))   } else { + if strings.HasPrefix(s, "ssh://") { + components := strings.SplitN(strings.TrimPrefix(s, "ssh://"), "/", 2) + domain, rest := components[0], components[1] + if strings.HasSuffix(domain, ".kilnhg.com") { + s = "https://" + domain + "/Code/" + rest + ".git" + } + }   base, err = url.Parse(s)   if err != nil || (base.Scheme != "http" && base.Scheme != "https") {   err = fmt.Errorf("must either have an HTTP remote or kiln.url specified in config")