@@ -360,6 +360,7 @@ func (p *Publisher) PublishToGcs(
360360 return fmt .Errorf ("write latest version file: %w" , err )
361361 }
362362
363+ logrus .Infof ("Running `gsutil cp` from %s to: %s" , latestFile , publishFileDst )
363364 if err := p .client .GSUtil (
364365 "-m" ,
365366 "-h" , "Content-Type:text/plain" ,
@@ -374,20 +375,22 @@ func (p *Publisher) PublishToGcs(
374375 var content string
375376 if ! privateBucket {
376377 // If public, validate public link
378+ logrus .Infof ("Validating uploaded version file using HTTP at %s" , publicLink )
377379 response , err := p .client .GetURLResponse (publicLink )
378380 if err != nil {
379381 return fmt .Errorf ("get content of %s: %w" , publicLink , err )
380382 }
381383 content = response
382384 } else {
383- response , err := p .client .GSUtilOutput ("cat" , publicLink )
385+ // Use the private location
386+ logrus .Infof ("Validating uploaded version file using `gsutil cat` at %s" , publishFileDst )
387+ response , err := p .client .GSUtilOutput ("cat" , publishFileDst )
384388 if err != nil {
385- return fmt .Errorf ("get content of %s: %w" , publicLink , err )
389+ return fmt .Errorf ("get content of %s: %w" , publishFileDst , err )
386390 }
387391 content = response
388392 }
389393
390- logrus .Infof ("Validating uploaded version file at %s" , publicLink )
391394 if version != content {
392395 return fmt .Errorf (
393396 "version %s it not equal response %s" ,
0 commit comments