Skip to content

Commit

Permalink
Add separate gorelease configs for windows and packages
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Nov 27, 2018
1 parent 91036f1 commit c4b4964
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 58 deletions.
52 changes: 52 additions & 0 deletions .goreleaser-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
project_name: 'geoipupdate'
archive:
wrap_in_directory: true
files:
- 'CHANGELOG.md'
- 'LICENSE-APACHE'
- 'LICENSE-MIT'
- 'README.md'
- 'GeoIP.conf'
- 'GeoIP.conf.md'
- 'geoipupdate.md'
builds:
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- '386'
- 'amd64'
goos:
- 'darwin'
- 'linux'
hooks:
post: 'make data BUILDDIR=. CONFFILE=/etc/GeoIP.conf DATADIR=/usr/share/GeoIP'
ldflags:
- '-s -w -X main.version={{.Version}} -X main.defaultConfigFile=/etc/GeoIP.conf -X main.defaultDatabaseDirectory=/usr/share/GeoIP'
checksum:
name_template: 'checksums-dpkg-rpm.txt'
nfpm:
vendor: 'MaxMind, Inc.'
homepage: https://www.maxmind.com/
maintainer: 'MaxMind, Inc. <[email protected]>'
description: Program to perform automatic updates of GeoIP2 and GeoIP Legacy binary databases.
license: Apache 2.0 or MIT
formats:
- deb
- rpm
bindir: /usr/bin
empty_folders:
- /usr/share/GeoIP
files:
'CHANGELOG.md': '/usr/share/doc/geoipupdate/CHANGELOG.md'
'LICENSE-APACHE': '/usr/share/doc/geoipupdate/LICENSE-APACHE'
'LICENSE-MIT': '/usr/share/doc/geoipupdate/LICENSE-MIT'
'README.md': '/usr/share/doc/geoipupdate/README.md'
'GeoIP.conf': '/usr/share/doc/geoipupdate/GeoIP.conf'
'GeoIP.conf.md': '/usr/share/doc/geoipupdate/GeoIP.conf.md'
'geoipupdate.md': '/usr/share/doc/geoipupdate/geoipupdate.md'
config_files:
'GeoIP.conf': '/etc/GeoIP.conf'
release:
# We disable the release as there is no way to disable the creation of
# the archive version and we don't want to upload those.
disable: true
24 changes: 24 additions & 0 deletions .goreleaser-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
project_name: 'geoipupdate'
archive:
wrap_in_directory: true
files:
- 'CHANGELOG.md'
- 'LICENSE-APACHE'
- 'LICENSE-MIT'
- 'README.md'
- 'GeoIP.conf'
- 'GeoIP.conf.md'
- 'geoipupdate.md'
format: zip
builds:
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- '386'
- 'amd64'
goos:
- 'windows'
hooks:
post: 'make data OS=Windows_NT BUILDDIR=.'
checksum:
name_template: 'checksums-windows.txt'
63 changes: 5 additions & 58 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,18 @@ archive:
- 'LICENSE-MIT'
- 'README.md'
- 'GeoIP.conf'
format_overrides:
- goos: windows
format: zip
- 'GeoIP.conf.md'
- 'geoipupdate.md'
builds:
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- 'amd64'
goos:
- 'darwin'
hooks:
post: 'make data BUILDDIR=dist/darwin_amd64'
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- '386'
goos:
- 'linux'
hooks:
post: 'make data BUILDDIR=dist/linux_386'
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- 'amd64'
goos:
- 'darwin'
- 'linux'
hooks:
post: 'make data BUILDDIR=dist/linux_amd64'
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- '386'
goos:
- 'windows'
hooks:
post: 'make data OS=Windows_NT BUILDDIR=dist/windows_386'
- main: './cmd/geoipupdate'
binary: 'geoipupdate'
goarch:
- 'amd64'
goos:
- 'windows'
hooks:
post: 'make data OS=Windows_NT BUILDDIR=dist/windows_amd64'
post: 'make data BUILDDIR=.'
checksum:
name_template: 'checksums.txt'
nfpm:
vendor: 'MaxMind, Inc.'
homepage: https://www.maxmind.com/
maintainer: 'MaxMind, Inc. <[email protected]>'
description: Program to perform automatic updates of GeoIP2 and GeoIP Legacy binary databases.
license: Apache 2.0 or MIT
formats:
- deb
- rpm
bindir: /usr/bin
empty_folders:
- /usr/share/GeoIP
files:
'CHANGELOG.md': '/usr/share/doc/geoipupdate/CHANGELOG.md'
'LICENSE-APACHE': '/usr/share/doc/geoipupdate/LICENSE-APACHE'
'LICENSE-MIT': '/usr/share/doc/geoipupdate/LICENSE-MIT'
'README.md': '/usr/share/doc/geoipupdate/README.md'
'GeoIP.conf': '/usr/share/doc/geoipupdate/GeoIP.conf'
'GeoIP.conf.md': '/usr/share/doc/geoipupdate/GeoIP.conf.md'
'geoipupdate.md': '/usr/share/doc/geoipupdate/geoipupdate.md'
config_files:
'GeoIP.conf': '/etc/GeoIP.conf'
name_template: 'checksums-darwin-linux.txt'

0 comments on commit c4b4964

Please sign in to comment.