@@ -360,6 +360,7 @@ func (p *Publisher) PublishToGcs(
360
360
return fmt .Errorf ("write latest version file: %w" , err )
361
361
}
362
362
363
+ logrus .Infof ("Running `gsutil cp` from %s to: %s" , latestFile , publishFileDst )
363
364
if err := p .client .GSUtil (
364
365
"-m" ,
365
366
"-h" , "Content-Type:text/plain" ,
@@ -374,20 +375,22 @@ func (p *Publisher) PublishToGcs(
374
375
var content string
375
376
if ! privateBucket {
376
377
// If public, validate public link
378
+ logrus .Infof ("Validating uploaded version file using HTTP at %s" , publicLink )
377
379
response , err := p .client .GetURLResponse (publicLink )
378
380
if err != nil {
379
381
return fmt .Errorf ("get content of %s: %w" , publicLink , err )
380
382
}
381
383
content = response
382
384
} 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 )
384
388
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 )
386
390
}
387
391
content = response
388
392
}
389
393
390
- logrus .Infof ("Validating uploaded version file at %s" , publicLink )
391
394
if version != content {
392
395
return fmt .Errorf (
393
396
"version %s it not equal response %s" ,
0 commit comments