From b51ccd66e62b4d15eb74d1dd739649109cc5ea42 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Fri, 3 Aug 2018 00:03:26 -0700 Subject: [PATCH] Add rpm/deb packages to travis deploy task --- .gitignore | 2 ++ .goreleaser.yml | 39 +++++++++++++++++++++++++-------------- .travis.yml | 13 ++++++------- go.mod | 6 +++--- go.sum | 4 ++++ 5 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 .gitignore create mode 100644 go.sum diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d59c7f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.snapcraft/snapcraft.cfg +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml index d541e7e..d061565 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,14 +1,16 @@ project_name: curl-httpie builds: -- - env: - - CGO_ENABLED=0 - goos: - - darwin - - linux - - freebsd - - windows - binary: http + - + binary: http + env: + - CGO_ENABLED=0 + goos: + - darwin + - linux + - freebsd + - windows +release: + name_template: "{{.ProjectName}}-v{{.Version}}" git: short_hash: true brew: @@ -19,9 +21,18 @@ brew: name: Olivier Poitrey email: rs@rhapsodyk.net homepage: https://github.com/rs/curl-httpie - description: HTTPie for curl + description: HTTPie for curl — The power of curl, the ease of use of httpie. conflicts: - - httpie - -release: - name_template: "{{.ProjectName}}-v{{.Version}}" + - httpie +nfpm: + maintainer: Olivier Poitrey + description: curl-httpie is a wrapper on top of curl that offers the ease of use of httpie without having to compromise curl features and performance. + license: MIT + formats: + - deb + - rpm + dependencies: + - curl + conflicts: + - httpie + bindir: /usr/bin diff --git a/.travis.yml b/.travis.yml index ba6632b..836c0cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,18 @@ +sudo: required language: go -go: -- '1.9' -- '1.10' -- master +go: '1.10' matrix: allow_failures: - go: master script: go test -v -race -cpu=1,2,4 -bench . -benchmem ./... deploy: -- provider: script - skip_cleanup: true - script: curl -sL http://git.io/goreleaser | bash + provider: script on: + branch: master tags: true condition: "$TRAVIS_OS_NAME = linux && $TRAVIS_GO_VERSION = '1.10'" + skip_cleanup: true + script: sudo apt-get update && sudo apt-get install rpm && curl -sL http://git.io/goreleaser | bash env: global: secure: 7Hb/SLMTpff9oj9VYaWhl/P6eDqBav17PCIVAjyNxlRSKpRJlNDsYGz3/i1XHy7BiNMKPstOK+VlB3sR4hrGrNew8EVhROXOXl8OFstA0eptdG0TgwBxsjXiXNFRR3ancgrOlbbsfcUx5qXapQEv/kqqhhh1DrR5i/khDeMIUnZ6/Lwtgw4VTbrQD3I599ORXV7VOxu6qQKL9g0w1rJb9UM+zIDJMMULmlYp31toA520dr4tIlKJANYJLlU5hnFJAvq7ywMTbfA5h6nDtahlTP0iF879gmIoXg9MZkynmPZ4fXhdFxn3Y2xLBCUAU+DoGAXvD3ggffUWVOrnZBKXSPVTBpMHbt9Xd/HPitShOeaQQNlaj29Ky4xzD/p2cDCY4oDL8QLtRF2zP7+GfRaUY0ara3D1Q33fyyoVEeiWskCEZSiENZjrxoyevVvjbLCgT7kDJp+szvfVWJp16oHMtLQ/yXt63ZJ0PAJXUp1UJHSrlmy0r7pfEqfRWN47d45b/ld0ARMLOpMpBVGYQK8SeH2hqQ4EAyU9Erf4llFT0c/T5xgO90s+0uPUswqnIj7BuzgILsAFZQsMW3PU3HQx0mmB7m/qHYWbmkudR3C3kkKMP8IPmhZUETcCPzj4Iy93GNU6De1bv+TrjY4OFBPgKEY52ji01940v5bq90UD7jQ= diff --git a/go.mod b/go.mod index 1cbf684..fb4d497 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/rs/curl-httpie require ( - github.com/akamensky/argparse v0.0.0-20180518035907-99676ba18cd5 - github.com/jessevdk/go-flags v1.4.0 + github.com/akamensky/argparse v0.0.0-20180518035907-99676ba18cd5 // indirect + github.com/jessevdk/go-flags v1.4.0 // indirect golang.org/x/crypto v0.0.0-20180524125353-159ae71589f3 - golang.org/x/sys v0.0.0-20180525062015-31355384c89b + golang.org/x/sys v0.0.0-20180525062015-31355384c89b // indirect ) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..0393e70 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/akamensky/argparse v0.0.0-20180518035907-99676ba18cd5/go.mod h1:pdh+2piXurh466J9tqIqq39/9GO2Y8nZt6Cxzu18T9A= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +golang.org/x/crypto v0.0.0-20180524125353-159ae71589f3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20180525062015-31355384c89b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=