File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,24 +120,23 @@ func (d *CliDeployer) Deploy(ctx context.Context) error {
120120 return err
121121}
122122
123- var urlRegex = regexp .MustCompile (`DEPLOYMENT_COMPLETED\s*([^\s] +)` )
123+ var urlRegex = regexp .MustCompile (`DEPLOYMENT_COMPLETED.+(https://\S +)` )
124124var internalURLRegex = regexp .MustCompile (`\.internal:\d+$` )
125125
126126func findUrlsInOutput (output string ) []string {
127127 var urls []string
128128 match := urlRegex .FindAllStringSubmatch (output , - 1 )
129+
130+ // Will never be nil if there is a match
129131 for _ , m := range match {
130- if m [1 ] == "" {
131- continue
132- }
132+ // Skip internal URLs
133133 if internalURLRegex .MatchString (m [1 ]) {
134134 log .Printf ("Skipping internal URL %v" , m [1 ])
135135 continue
136136 }
137- // Check if the URL starts with a scheme (http, https, etc.)
138- if strings .HasPrefix (m [1 ], "https://" ) {
139- urls = append (urls , m [1 ])
140- }
137+
138+ // Add the URL if there a https URL found
139+ urls = append (urls , m [1 ])
141140 }
142141 return urls
143142}
You can’t perform that action at this time.
0 commit comments