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

feat: support gzip format #959

Merged
merged 3 commits into from Feb 7, 2019

Conversation

Projects
None yet
3 participants
@caarlos0
Copy link
Member

caarlos0 commented Feb 7, 2019

refs #958

caarlos0 added some commits Feb 7, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Feb 7, 2019

Codecov Report

Merging #959 into master will decrease coverage by 0.2%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #959      +/-   ##
==========================================
- Coverage   88.43%   88.23%   -0.21%     
==========================================
  Files          51       52       +1     
  Lines        2465     2491      +26     
==========================================
+ Hits         2180     2198      +18     
- Misses        229      233       +4     
- Partials       56       60       +4
Impacted Files Coverage Δ
pkg/archive/targz/targz.go 71.42% <ø> (ø)
pkg/archive/archive.go 100% <100%> (ø) ⬆️
pkg/archive/gzip/gzip.go 72.72% <72.72%> (ø)

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 adcc452...00d0639. Read the comment docs.

@frapposelli

This comment has been minimized.

Copy link

frapposelli commented Feb 7, 2019

wow, thanks for the super quick turnaround ❤️ 👍

The patch works great when there's one single build, but when the builds are > 1 it tries to add the second binary to the same archive (instead of creating a new one) and fails:

project_name: govmomi
builds:
- binary: govc
  main: ./govc/
[...]
- binary: vcsim
  main: ./vcsim/
[...]
archive:
  name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}'
  format: gz
  format_overrides:
    - goos: windows
      format: zip
  files:
  - none*
[...]
govmomi · goreleaser-rehaul± ⟩ goreleaser --rm-dist --snapshot --skip-publish -p 24

   • releasing using goreleaser dev...
   • loading config file       file=.goreleaser.yml
   • RUNNING BEFORE HOOKS
   • GETTING AND VALIDATING GIT STATE
      • releasing v0.20.0, commit 2cce146648c5c7d1b85b76e48e74bc6068532f13
      • pipe skipped              error=disabled during snapshot mode
   • PARSING TAG
   • SETTING DEFAULTS
      • LOADING ENVIRONMENT VARIABLES
      • SNAPSHOTING
      • GITHUB RELEASES
      • PROJECT NAME
      • ARCHIVES
      • BUILDING BINARIES
         • you have more than 1 build setup: please make sure it is a not a typo on your config
      • LINUX PACKAGES WITH NFPM
      • SNAPCRAFT PACKAGES
      • CALCULATING CHECKSUMS
      • SIGNING ARTIFACTS
      • DOCKER IMAGES
      • ARTIFACTORY
      • S3
      • HOMEBREW TAP FORMULA
      • SCOOP MANIFEST
   • SNAPSHOTING
   • CHECKING ./DIST
      • --rm-dist is set, cleaning it up
   • WRITING EFFECTIVE CONFIG FILE
      • writing                   config=dist/config.yaml
   • GENERATING CHANGELOG
      • pipe skipped              error=not available for snapshots
   • LOADING ENVIRONMENT VARIABLES
      • pipe skipped              error=publishing is disabled
   • BUILDING BINARIES
      • building                  binary=dist/freebsd_arm_6/govc
      • building                  binary=dist/linux_amd64/govc
      • building                  binary=dist/linux_386/govc
      • building                  binary=dist/darwin_386/govc
      • building                  binary=dist/linux_arm64/govc
      • building                  binary=dist/darwin_amd64/govc
      • building                  binary=dist/linux_arm_6/govc
      • building                  binary=dist/windows_386/govc.exe
      • building                  binary=dist/windows_amd64/govc.exe
      • building                  binary=dist/freebsd_amd64/govc
      • building                  binary=dist/freebsd_386/govc
      • building                  binary=dist/freebsd_arm_6/vcsim
      • building                  binary=dist/linux_arm64/vcsim
      • building                  binary=dist/freebsd_386/vcsim
      • building                  binary=dist/windows_386/vcsim.exe
      • building                  binary=dist/freebsd_amd64/vcsim
      • building                  binary=dist/windows_amd64/vcsim.exe
      • building                  binary=dist/linux_amd64/vcsim
      • building                  binary=dist/linux_386/vcsim
      • building                  binary=dist/darwin_amd64/vcsim
      • building                  binary=dist/darwin_386/vcsim
      • building                  binary=dist/linux_arm_6/vcsim
   • ARCHIVES
      • creating                  archive=dist/govc_linux_arm64.gz
      • creating                  archive=dist/govc_darwin_386.gz
      • creating                  archive=dist/govc_freebsd_386.gz
      • creating                  archive=dist/govc_linux_386.gz
      • creating                  archive=dist/govc_darwin_amd64.gz
      • creating                  archive=dist/govc_freebsd_arm.gz
      • creating                  archive=dist/govc_windows_386.zip
      • creating                  archive=dist/govc_linux_amd64.gz
      • creating                  archive=dist/govc_windows_amd64.zip
      • creating                  archive=dist/govc_linux_arm.gz
      • creating                  archive=dist/govc_freebsd_amd64.gz
   ⨯ release failed after 10.60s error=failed to add dist/freebsd_arm_6/vcsim -> vcsim to the archive: gzip: failed to add vcsim, only one file can be archived in gz format
@caarlos0

This comment has been minimized.

Copy link
Member Author

caarlos0 commented Feb 7, 2019

yeah, this will not be possible right now... the fix is big and will land on #705

will add a note to the docs though

@caarlos0

This comment has been minimized.

Copy link
Member Author

caarlos0 commented Feb 7, 2019

you may workaround it with multiple .goreleaser files... one for each build :)

@frapposelli

This comment has been minimized.

Copy link

frapposelli commented Feb 7, 2019

sounds good, thanks a ton!

@caarlos0 caarlos0 merged commit d2fa6d5 into master Feb 7, 2019

3 of 5 checks passed

codecov/patch 78.57% of diff hit (target 88.43%)
Details
codecov/project 88.23% (-0.21%) compared to adcc452
Details
WIP ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@caarlos0 caarlos0 deleted the gzip branch Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.