Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upload gcs blobs to bucket root #2373

Closed

Conversation

abemedia
Copy link
Contributor

Currently, when trying to upload files to the root of a gcs bucket using the config below it actually creates a directory called / with all the files inside it.

blobs:
  - provider: gs
    bucket: my-bucket-name
    ids:
      - myapp
    folder: '/'

This fix allows uploading to the root of a gcs bucket.

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 30, 2021
@vercel
Copy link

vercel bot commented Jul 30, 2021

@abemedia is attempting to deploy a commit to the goreleaser Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #2373 (09bcdc0) into master (5b3f286) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2373   +/-   ##
=======================================
  Coverage   82.92%   82.93%           
=======================================
  Files          83       83           
  Lines        6062     6064    +2     
=======================================
+ Hits         5027     5029    +2     
  Misses        887      887           
  Partials      148      148           
Impacted Files Coverage Δ
internal/pipe/blob/upload.go 73.80% <100.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b3f286...09bcdc0. Read the comment docs.

@caarlos0
Copy link
Member

caarlos0 commented Aug 1, 2021

I think you could just not inform anything on folder? Its the same behavior on other places AFAIK 🤔

@abemedia
Copy link
Contributor Author

abemedia commented Aug 2, 2021

If folder is an empty string it goes to {{.PackageName}}/{{.Version}}.

@caarlos0
Copy link
Member

caarlos0 commented Aug 2, 2021

ah, makes sense... can you add a test for it as well?

thanks!

@abemedia
Copy link
Contributor Author

abemedia commented Aug 2, 2021

Sure thing!

@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants